Jump to content

[Solved] Skipping Tile Entites


calclavia

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.  :)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.