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.
This week I finished the GUI handler tutorial, which is useless and will not launch without additional code. I'm almost finished the GUI container tutorial, which is about assigning a GUI to my block, and should fix all the issues caused by the previous tutorial. Good news, as I now know, thanks to the two tutorials, where to put my personal custom code for the tile entity.
I didn't get too much done this week, but I do have most of the inventory added. A lot of time can easily be eaten up if I sufficient comments in my code, but it can be well worth it. If, near the end, I have time, I'd like to do an overhaul of my comments, but I think that content should come first.
This week was mostly tutorials. I read the tile entity data tutorial, which was about NBT (Named Binary Tag) data and how to add it to a tile entity. I also read through the first part of the tile entity with inventory tutorial.
Last week, I successfully added a tile entity to a block. My next step is adding data to my tile entity. The list of things I need to do are, in order:After all that is completed, I will need to look at where I am, evaluate my progress, and decide where to go next.
As my computer got a virus this week, I was unable to progress on my mod. The good news is that I had exported my mod shortly before needing to reinstall Windows. The work I did consisted reinstalling drivers, re-setting up my development environment with the help of this tutorial, and successfully recovering all work done on my mod.
Last week, I added a simple block to the game, and gave it a way to be created. Upon further reading of tutorials, however, I realized that a simple block is not what I want for my purpose. I want to make what is know as a tile entity, which can store data, update itself once per in-game tick, and dynamically change textures.
|
Quinn Buratynski
I am in 10th grade, and intend to make a Minecraft mod. ArchivesCategories |