Everything is finally done. I read through a lot of open-source code, looking for things similar to what I'm doing. It's been a pretty big week, a lot has happened. All the textures on my tile entity now work, from the GUI to the item model to the in-game block model. Earlier this week, I implemented temporary potion effects, based off of some code from the Talismans 2 mod. The hard part was figuring out how to target the player, but I realized I could set a variable using the value passed to a different method; the one that says who activated the block. I later figured out, with help from a question someone asked on the Minecraft Forge Forums, how to directly change the player stats themselves. These changes only lasted until death, so I needed to find a way to re-implement them every so often. A separate question asked on GitHub helped me with performing a function every tick. There was a small problem with calling the function on a player that had died, so I found a way to re-set the player variable. Finally, I managed to add another, small buff for getting rid of hunger. One last source I forgot to cite earlier, TheGreyGhost on GitHub showed me a little bit about how to manipulate a tile entity through his tutorials.
I didn't get much done last week, and it's probably going to be like that for a bit. I managed to add a simple function that can check all possible costs against the tile entity's inventory. Now, I'm just reading through source codes of Minecraft and other mods, like this one, or another called haumic Horizons for how to implement bonuses.
I got a fair bit of work done last week. I finished the last of the tutorials. The inventory and GUI are now fully functional; you can see inside the block, remove ItemStacks, and put ItemStacks in by hand. While functional, the GUI isn't pretty. The graphic I made for it doesn't seem to want to work, so I just have a black-purple checkerboard in the square where the texture should be. I decided it wasn't worth my time to fix after spending about three fruitless hours on it. My mod is now on GitHub, but I'm not providing a link before I figure out how to work GitHub and update my progress on there, which is to say probably never. Lastly, I added the first part of the purpose. The TileEntity attached to my block will now check its inventory once a tick to see if it contains an ItemStack with a certain item ID. If it does, it prints "works" to the console, and decreases the size of the stack by one. All that's left is giving the boost to the player when the item is consumed.
|
Quinn Buratynski
I am in 10th grade, and intend to make a Minecraft mod. ArchivesCategories |