Posted May 9, 201213 yr My tile entities seem to not be saving their data that I assigned them to save in the NBT functions. Everytime when I load the world it says "Skipping Tile Entity with ID xxxx". I called the method: ModLoader.RegisterTileEntity(net.minecraft.src.TileEntityExample.class, "Example"); I'm wondering if that's the problem. I placed a System.out.println at the read function and it never gets called. For some reason it's not READING the tile entity information. http://calclavia.com/uploads/banner.png[/img]
May 9, 201213 yr Its not reading the info because you are not registering the name before it tries to load. Or, your name has some invalid characters in it. Or, your TE can't be created. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
May 10, 201213 yr Author Its not reading the info because you are not registering the name before it tries to load. Or, your name has some invalid characters in it. Or, your TE can't be created. How would I register the name before it loads? I have the function called in the load() in my NetworkMod/BaseMod class (mod_XXX). The name of my tile entity is "ICBMMissileLauncher" and I don't think there are any illegal characters in that. My tile entity works fine in the game. The only problem is that it doesn't read data from NBT properly. I think this is related to the tile entity not registering properly. http://calclavia.com/uploads/banner.png[/img]
May 10, 201213 yr Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message. See what its reading, and compare it to the list of possible mappings. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
May 10, 201213 yr Author Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message. See what its reading, and compare it to the list of possible mappings. When the world loads with my tile entity inside, java keeps throws out errors like "java.lang.InstantiationException:net.minecraft.src.ICBMTileEntityXXX" when the tile entity tries to read data from NBT. After that error, it says "Skipping TileEntity with ID XXX". I'm a beginner at modding so I'm not sure what mapping is in this context and tossing break points. Can you please explain? http://calclavia.com/uploads/banner.png[/img]
May 10, 201213 yr Full, uncensored errors would be helpful, its rather shame that it's taken me actually asking for you to do it -.- I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
May 14, 201213 yr Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message. See what its reading, and compare it to the list of possible mappings. When the world loads with my tile entity inside, java keeps throws out errors like "java.lang.InstantiationException:net.minecraft.src.ICBMTileEntityXXX" when the tile entity tries to read data from NBT. After that error, it says "Skipping TileEntity with ID XXX". I'm a beginner at modding so I'm not sure what mapping is in this context and tossing break points. Can you please explain? Tossing a break point is finding the spot where the bat thing happens, placing a break, and single-stepping the code from there. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
May 16, 201213 yr i had this happen for a while when coding NPCs what you need to do is add another constuctor that just predefines varables. For example public EntityGuardBase(World world) { this(world,0,0); } both of the zero are varables i defined in the actual constructor that are not pulled until Nbt data is read. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 17, 201213 yr Author i had this happen for a while when coding NPCs what you need to do is add another constuctor that just predefines varables. For example public EntityGuardBase(World world) { this(world,0,0); } both of the zero are varables i defined in the actual constructor that are not pulled until Nbt data is read. I solved the problem! I got rid of my constructor which had a parameter which is metadata (since my tile entity has a metadata). It works fine now and I found another way to retrieve the metadata information. Creating an empty constructor could also work. Thanks for the help! http://calclavia.com/uploads/banner.png[/img]
May 17, 201213 yr you think you can show how you got the metadata from your tile entity. I've been trying to make some tile entities and haven't figure that one out. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 18, 201213 yr Author you think you can show how you got the metadata from your tile entity. I've been trying to make some tile entities and haven't figure that one out. Use world.getBlockMetadata to get the metadata of the block the tilen entity is in. http://calclavia.com/uploads/banner.png[/img]
May 18, 201213 yr you think you can show how you got the metadata from your tile entity. I've been trying to make some tile entities and haven't figure that one out. Use world.getBlockMetadata to get the metadata of the block the tilen entity is in. Thank you. Might actual get something done for the barracks block of my mod. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.