So recently I have decided that I would like to start modding Minecraft and I decided I would start where it seemed logical; Pahimar's Let's Mod Reboot series. This was going fantastic until it well...ended (not really, Pahimar just isn't prioritizing it for very good reasons.) Anyway, Those tutorials were fantastic and I got everything that he was teaching but In my desire to progress further I have come across some questions.
*Be gentle, I'm new at this.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
As far as I know a TileEntity is a type of block that can store more than 4 Bits of data such as a chest or furnace. Yet how do I work with TileEntities? Or better yet, create and do stuff with them.
For example, I looked at the EE3 code to see how the alchemical chest was created, I noticed in the block class this "createTileEntity" method it takes class a world object and a integer for metadata. Does this mean that TileEntities need to be instantiated from a block? If so, why register TileEntities?
I also noticed that all of the items in the chest are written to NBT and read from NBT, do all chests (from other mods/vanilla) do this? If not, what are the advantages of this?
I looked for how to create a item as a fuel. I found a tutorial on the Minecraft Forge wiki but it must be outdated as it asks to initialize a item as a "ItemFuel" and I can't seem to do that. The only thing I can find related to fuel is this "IFuelHandler" interface which just takes burn time. I added it to the item class and It (as I expected, didn't work) So how does one go about doing this?
If I wanted to go about creating a GUI, where would I start, I looked at the "BlockChest" class and noticed this "onBlockActivated" method, I decided to use it in my created block, I successfully made the block, on right click to create a vaniila chest GUI. I traced this "displayGUIChest" method back to EntityPlayer, but it was just an empty method but I found this "openGUI" method, but it was rather confusing, might anyone be able to explain this a bit?
If I wanted to alter the world generation, say play with the way tree's generate, where would I start? Or implement my own generation.
I know that a packet is a piece of data that is sent from the client to the server telling it something. How can I utilize these? What are their uses in vanilla items or maybe in some mod items? How do I handle these, and when do I have to use them?
---------------------------------------------------------------------------------------------------------------------------------------------------------
If I may, I also have a few java related questions / smaller questions about modding. I know java, just as clarification for something I may have not learned.
For this: *EE3 Code
If I am interpreting this right, this is simply cycling through the inventory of a the chest, checking if a slot is null, if it isn't it is writing the item to NBT in the following format: "Slot 1 *Insert the item here"
Only thing I am not quite sure of is the "(byte) currentIndex" I assume this is converting the inventory slot integer to a byte but why in this format? To convert to any other format, say Int -> Float it would be Float.parseFloat(Integer.toString(*Integer)). My point being why isn't it a method call? Like Byte.parseByte()?
I am planning on creating an addon mod for Thaumcraft, how does one go about doing this? Is there an up to date guide about this? *Created a addon mod for anther mod that is
Why are all the variables in forge something like "p_152446_1_"? The code is still very readable, just curious for this one. It's like going "Hello, Meet my friend p_152446_1_!", it's still a legible sentence, just has me going "lol wut?".
----------------------------------------------------------------------------------------------------------------------------------------------------------
I might add more to this as I get more questions to ask but these are mainly what I am curios of at the moment.
Any answer / help is greatly appreciated. Thanks in advance!
If anyone has a YouTube series (I am a very visual person) that focus's on 1.7.10 modding and explains everything in depth I would very much like watch it. Everything I could find was either outdated or more outdated.
*Be gentle, I'm new at this.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
As far as I know a TileEntity is a type of block that can store more than 4 Bits of data such as a chest or furnace. Yet how do I work with TileEntities? Or better yet, create and do stuff with them.
For example, I looked at the EE3 code to see how the alchemical chest was created, I noticed in the block class this "createTileEntity" method it takes class a world object and a integer for metadata. Does this mean that TileEntities need to be instantiated from a block? If so, why register TileEntities?
I also noticed that all of the items in the chest are written to NBT and read from NBT, do all chests (from other mods/vanilla) do this? If not, what are the advantages of this?
I looked for how to create a item as a fuel. I found a tutorial on the Minecraft Forge wiki but it must be outdated as it asks to initialize a item as a "ItemFuel" and I can't seem to do that. The only thing I can find related to fuel is this "IFuelHandler" interface which just takes burn time. I added it to the item class and It (as I expected, didn't work) So how does one go about doing this?
If I wanted to go about creating a GUI, where would I start, I looked at the "BlockChest" class and noticed this "onBlockActivated" method, I decided to use it in my created block, I successfully made the block, on right click to create a vaniila chest GUI. I traced this "displayGUIChest" method back to EntityPlayer, but it was just an empty method but I found this "openGUI" method, but it was rather confusing, might anyone be able to explain this a bit?
If I wanted to alter the world generation, say play with the way tree's generate, where would I start? Or implement my own generation.
I know that a packet is a piece of data that is sent from the client to the server telling it something. How can I utilize these? What are their uses in vanilla items or maybe in some mod items? How do I handle these, and when do I have to use them?
---------------------------------------------------------------------------------------------------------------------------------------------------------
If I may, I also have a few java related questions / smaller questions about modding. I know java, just as clarification for something I may have not learned.
For this: *EE3 Code
for (int currentIndex = 0; currentIndex < inventory.length; ++currentIndex)
{
if (inventory[currentIndex] != null)
{
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte) currentIndex);
inventory[currentIndex].writeToNBT(tagCompound);
tagList.appendTag(tagCompound);
}
}
nbtTagCompound.setTag(Names.NBT.ITEMS, tagList);
{
if (inventory[currentIndex] != null)
{
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte) currentIndex);
inventory[currentIndex].writeToNBT(tagCompound);
tagList.appendTag(tagCompound);
}
}
nbtTagCompound.setTag(Names.NBT.ITEMS, tagList);
Only thing I am not quite sure of is the "(byte) currentIndex" I assume this is converting the inventory slot integer to a byte but why in this format? To convert to any other format, say Int -> Float it would be Float.parseFloat(Integer.toString(*Integer)). My point being why isn't it a method call? Like Byte.parseByte()?
I am planning on creating an addon mod for Thaumcraft, how does one go about doing this? Is there an up to date guide about this? *Created a addon mod for anther mod that is
Why are all the variables in forge something like "p_152446_1_"? The code is still very readable, just curious for this one. It's like going "Hello, Meet my friend p_152446_1_!", it's still a legible sentence, just has me going "lol wut?".
----------------------------------------------------------------------------------------------------------------------------------------------------------
I might add more to this as I get more questions to ask but these are mainly what I am curios of at the moment.
Any answer / help is greatly appreciated. Thanks in advance!
If anyone has a YouTube series (I am a very visual person) that focus's on 1.7.10 modding and explains everything in depth I would very much like watch it. Everything I could find was either outdated or more outdated.
Last edited: