Jump to content

Recommended Posts

Posted

Hello, I have created a furnace type block, with 2 input slots. Everything works fine, then I added a power varible. I saved it to NBT, then read it, but when I place down 2 Charging Station, both power levels read the same.

 

If you need any more code or infomation, just say.

 

Here is a small video of whats happening:

 

https://www.youtube.com/watch?v=AIOpvkqamOc

 

Tile Entity:

 

 

  Reveal hidden contents

 

 

 

 

 

 

Not new to java >> New to modding.

Posted

Don't have time to read it in depth right now, I'll look later.

 

Two things jumped out at me quick.

Why do you have the 'static' designation on your power?  There isn't a need.

Are you sure 'power' isn't accidentaly used by minecraft already?

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

Thanks for the help, but i need the variable to be static, in my GUI class it prints the power lvl:

 

        fontRendererObj.drawString(StatCollector.translateToLocal("Power (DP): " + (short)TileEntityChargingStation.power, 75, 65, 0x404040);

 

Not new to java >> New to modding.

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.