Jump to content

Recommended Posts

Posted

Well the you can see the block on the server, but when you click it, its not there anymore.. That's because the block is only placed on the Client side world.. but how do I set the block Server Side from a client?

 

My Gui class:

 

  Reveal hidden contents

 

 

My Block class:

 

  Reveal hidden contents

 

 

So how can I do this?

Posted

BUT You can't read the variable..

cuz this is in my Packet right now:

 

  Reveal hidden contents

 

 

So how can I store a world variable?

Posted

you cant and you dont need. if you want to change the world the player is currently in simply go and get the worldObj from the player.

the handleMessage of the imessagehandler gives u an context ctx. so just go ctx.getServerHandler().playerEntity.worldObj. I might be wrong with some naming here, search ur ide

Posted
  On 9/12/2015 at 11:25 AM, Failender said:

you cant and you dont need. if you want to change the world the player is currently in simply go and get the worldObj from the player.

the handleMessage of the imessagehandler gives u an context ctx. so just go ctx.getServerHandler().playerEntity.worldObj. I might be wrong with some naming here, search ur ide

 

So I have to make a public variable in the messagehandler/packethandler?

Posted
  On 9/12/2015 at 11:25 AM, Failender said:

the handleMessage of the imessagehandler gives u an context ctx. so just go ctx.getServerHandler().playerEntity.worldObj. I might be wrong with some naming here, search ur ide

Posted

I did what Failander(or whatever his name is) told me to do and I'm having the exact same problem as I was having before.

My IMessageHandler class:

 

 

  Reveal hidden contents

 

 

My Block class:

 

  Reveal hidden contents

 

 

And when you click the block, a gui opens, the Gui class:

 

  Reveal hidden contents

 

 

As I already mentioned, the block is visible only for the client on the server, until you activate(right-click) it.

What I need to do is set a block in the server's world not in the client's one.. Because the Gui class is clientside only, it places the block clientside(on a server) aswell.

 

EDIT:

Uploaded a video: https://youtu.be/QwC14FKs0AM

Posted
  On 9/12/2015 at 2:26 PM, Failender said:

diesieben has more understanding of minecraft and modding then u might ever have so dont come up with u dont understand the code if u have no idea what u r doing.

 

I know what I'm doing but you just don't understand my code

Posted
  On 9/12/2015 at 2:28 PM, diesieben07 said:

  Quote

You just don't understand the code

I literally can't even...

 

...think of an appropriate meme to post now.

Just speechless.

 

let me help you out.

 

hqdefault.jpg

 

If u say we cant understand ur code dont ask for help. thank you.

 

 

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.