Jump to content

Recommended Posts

Posted
1 minute ago, diesieben07 said:

You can do that. But you must also have a no-argument constructor and you must be aware that only the no-argument constructor will be used when reading your TileEntity from disk.

I'm now using zero-argument constructor, but energy again restores to 0.

UPD: I created zero-argument constructor and it deleted! What?

Posted
2 minutes ago, diesieben07 said:

In the code you posted the energy is never changed.

 

What indeed, please clarify what "deleted".

Sorry, this is problem with GitHub. 

Posted
16 minutes ago, diesieben07 said:

You can do that. But you must also have a no-argument constructor and you must be aware that only the no-argument constructor will be used when reading your TileEntity from disk.

I recrated zero-argument constructor and uploaded new code to GitHub.

Posted
Just now, diesieben07 said:

I don't want video. I want code that shows where you change the energy. You have shown no such code, as such I can only assume that the energy value never changes.

Energy don't change, but after world restart it always maximum. I think, that this is storage creating or update() method problem.

Posted

After i typed /blockdata ... ... ... {Energy:5000}, energy changed to 5000 properly. When I reloaded world, energy saved and readed properly! GUI shows 5034 (this is previous value). But /blockdata shows 5000. I need to send energy level to client?

Posted
12 minutes ago, MineDen said:

After i typed /blockdata ... ... ... {Energy:5000}, energy changed to 5000 properly. When I reloaded world, energy saved and readed properly! GUI shows 5034 (this is previous value). But /blockdata shows 5000. I need to send energy level to client?

Any time the TE data changes and you want to update the client, call these methods:
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L95-L98

And have these methods overridden

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
2 hours ago, Draco18s said:

In 1.12.1, method this.getState() not exist. What method i need to use?

Posted

nope

 

this is the javadoc for isremote

 

Quote

/**
 * True if the world is a 'slave' client; changes will not be saved or propagated from this world. For example,
 * server worlds have this set to false, client worlds have this set to true.
 */

 

Posted
1 minute ago, diesieben07 said:

For the hundredth time: WHERE?

 

Here.

 

2 minutes ago, loordgek said:

nope

 

this is the javadoc for isremote

 

 

Lol. Sorry, I'm read only 0.2% of this comments.

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.