Jump to content

Recommended Posts

Posted

I am trying to update redstone gate to 1.3.2 (unofficially, sorry) and i have managed to get the gate to render with the gui working and everything, but whenever i place the gate and then relog the metadata resets back to 0! Plus because the metadata isn't saving the gate does not even work, not even before reloging! Can someone please help.

Here is my code:

RedstoneGate.java

 

  Reveal hidden contents

 

 

BlockRedstoneGate.java

 

  Reveal hidden contents

 

 

TileEntityRedstoneGate.java

 

  Reveal hidden contents

 

 

ContainerRedstoneGate.java

 

  Reveal hidden contents

 

 

EDIT: you probably need the renderer!

BlockRendererRedstoneGate.java

 

  Reveal hidden contents

 

  • 2 weeks later...
Posted

I am running into similar problems.  I'm using tile entity to store the orientation of my dyed stairs, and using the damage to determine their color.

 

When I place the block, everything renders fine.  When I log out and back in, the orientation of the stairs changes to what I set the value to initially, which makes all the stairs point in the same direction.  Am I missing something?

 

I'm using the details here on setting up Tile Entities (as well as what I see done by the original minecraft code)

http://www.minecraftforge.net/wiki/How_to_use_NBT_Tag_Compound#Making_the_TileEntity

 

You can find my code at:

https://github.com/Kyraleese/Mod-To-Dye-For-1.3.2.001

 

If someone could point me in the right direction for what I might be forgetting to do, I would greatly appreciate it.  I keep thinking that I need to do a readFromNBT instead of referencing ourEntity.orientation directly like I am.

Posted

Hrm, I looked in your code above; I'm not finding anything that refers to packets.

 

I have been able to make use of the onActivate to see what was stored in the entity.  The strange thing is that the value of my data I'm storing is remaining;  IE: I place the stair and the entity data for its orientation is set to 3.  I log out, log back in, and it's still set to 3.  But it's rendering as if it's set to 2 (which is the arbitrary asignment I have made to it).

 

Could you show me some code with the fixes you made highlighted?

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.

Announcements



×
×
  • Create New...

Important Information

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