Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • [Solved] Skipping Tile Entites
Sign in to follow this  
Followers 1
calclavia

[Solved] Skipping Tile Entites

By calclavia, May 9, 2012 in General Discussion

  • Reply to this topic
  • Start new topic

Recommended Posts

calclavia    81

calclavia

calclavia    81

  • World Shaper
  • calclavia
  • Forge Modder
  • 81
  • 2281 posts
Posted May 9, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

LexManos    1519

LexManos

LexManos    1519

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1519
  • 8573 posts
Posted May 9, 2012

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.

 

  • Quote

Share this post


Link to post
Share on other sites

calclavia    81

calclavia

calclavia    81

  • World Shaper
  • calclavia
  • Forge Modder
  • 81
  • 2281 posts
Posted May 10, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

LexManos    1519

LexManos

LexManos    1519

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1519
  • 8573 posts
Posted May 10, 2012

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.

 

  • Quote

Share this post


Link to post
Share on other sites

calclavia    81

calclavia

calclavia    81

  • World Shaper
  • calclavia
  • Forge Modder
  • 81
  • 2281 posts
Posted May 10, 2012

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?

  • Quote

Share this post


Link to post
Share on other sites

LexManos    1519

LexManos

LexManos    1519

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1519
  • 8573 posts
Posted May 10, 2012

Full, uncensored errors would be helpful, its rather shame that it's taken me actually asking for you to do it -.-

  • Quote

Share this post


Link to post
Share on other sites

atrain99    68

atrain99

atrain99    68

  • World Shaper
  • atrain99
  • Forge Modder
  • 68
  • 1502 posts
Posted May 14, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

DarkGuardsman    61

DarkGuardsman

DarkGuardsman    61

  • World Shaper
  • DarkGuardsman
  • Forge Modder
  • 61
  • 1479 posts
Posted May 16, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

calclavia    81

calclavia

calclavia    81

  • World Shaper
  • calclavia
  • Forge Modder
  • 81
  • 2281 posts
Posted May 17, 2012

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!

  • Quote

Share this post


Link to post
Share on other sites

DarkGuardsman    61

DarkGuardsman

DarkGuardsman    61

  • World Shaper
  • DarkGuardsman
  • Forge Modder
  • 61
  • 1479 posts
Posted May 17, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

calclavia    81

calclavia

calclavia    81

  • World Shaper
  • calclavia
  • Forge Modder
  • 81
  • 2281 posts
Posted May 18, 2012

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.

  • Quote

Share this post


Link to post
Share on other sites

DarkGuardsman    61

DarkGuardsman

DarkGuardsman    61

  • World Shaper
  • DarkGuardsman
  • Forge Modder
  • 61
  • 1479 posts
Posted May 18, 2012

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

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Yanny7
      [1.14.4] Stone Age mod

      By Yanny7 · Posted 17 minutes ago

      v1.0.1 - added mammoth tusk item - added Mammoth entity - moved tools to mod group - integrated TheOneProbe - drying rack improved add/remove item - fixed Aquaduct connecting vertically
    • salvestrom
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By salvestrom · Posted 31 minutes ago

      I did not say at any point that your model should extend model entity.   This requires three classes. Your entity class should extend HorseEntity giving you access to all of the GUI, saddling and taming. Your render class should be adjusted to not be using the superfluous classy created, as I previously mentioned. Your model class needs to extend HorseModel – this is how you will inherit the animations and bulk of the model.   Note that AbstractHorseEntity does not have all of the code for horses, only the shared code between the various horse entities.
    • RyanGV95
      Forge Can't Install

      By RyanGV95 · Posted 1 hour ago

      I’ll give that a shot after I get off. Thanks so much!
    • solitone
      Distinguish singleplayer vs. multiplayer

      By solitone · Posted 1 hour ago

      So I would have ServerScriptItem and ClientScriptItem, both inheriting from ScriptItem, and I would register a ServerScriptItem object on the dedicated server and a ClientScriptItem object on the client?
    • Draco18s
      1.12.2-Problem with tile entity custom crafting table

      By Draco18s · Posted 1 hour ago

      https://mcforge.readthedocs.io/en/1.13.x/networking/
  • Topics

    • Yanny7
      1
      [1.14.4] Stone Age mod

      By Yanny7
      Started 3 hours ago

    • DragonITA
      27
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started Monday at 10:06 AM

    • RyanGV95
      3
      Forge Can't Install

      By RyanGV95
      Started 4 hours ago

    • solitone
      14
      Distinguish singleplayer vs. multiplayer

      By solitone
      Started December 5

    • mindstorm3223
      3
      1.12.2-Problem with tile entity custom crafting table

      By mindstorm3223
      Started Yesterday at 02:18 AM

  • Who's Online (See full list)

    • diesieben07
    • willydd123456
    • salvestrom
    • vMystic
    • Toast10
    • plugsmustard
    • Yanny7
    • Lea9ue
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • [Solved] Skipping Tile Entites
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community