Jump to content

Recommended Posts

Posted

A well okay - now. I found a way doing it with a clientOnly method and render it on the tileentity - see:

@SideOnly(Side.CLIENT)
public float clientVoltage;

        //Update method
       if(worldObj.isRemote)
       {
	this.clientVoltage=getVoltage();
       }

SO, that thing is fixed now - thanks :)

 

Don't use @SideOnly.. It is not for those cases.

Just use packet with the position to sync information.

(Keep in mind that clientside tileentity and serverside tileentity is different instance)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

Posted

It works, but the point is you don't need a new variable to hold the information.  Just use the same variable you already had.  You're not going to break anything.

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

*Facepalm*

 

You get the data out of the packet the same way it got in.  Its not fucking magic.

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.

  • 2 weeks later...
Posted

Okay, there still are some tiny bugs that i wanna fix but i don't know how:

1. When i connect two blocks e.g a powersource with a lantern, the lanternblock itself gets updatet(becomes a lightvalue), but not the blocks around it. Even if i make markBlockForUpdtate on it.

2. The voltage in a block itself does not get updated immediatly sometimes(At least it does not show up when i draw a string with that voltage)

 

PS: For number two, i use @SideOnly(Side.CLIENT) variables which i set in a (worldObj.isRemote) check.

Guest
This topic is now closed to further replies.

Announcements




×
×
  • Create New...

Important Information

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