Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to course page

Forging a Minecraft mod

Basic Minecraft modding with Minecraft Forge

Packet Handler

  • 2013-09-01 08:26:48
    I am having trouble with the packet handler as the variables don't seem to change once initially set however they are not final. This is for the assignment so I know you may not be able to tell me whats wrong but any clues would be much appreciated as this has stopped progress.

    Here is the Packet handler class if you require any other classes just ask. I haven't uploaded them all as I don't know which ones you will need and this is part of the assignment so I don;t want to upload to much code so others doing can work out how to go about the assignment themselves.

  • 2013-09-01 08:29:24
    It shouldn't be static, nor in the PacketHandler itself.
  • 2013-09-01 08:45:40
    Ok thanks I'll look into that.
  • 2013-09-01 08:54:08
    The problem is that the variable in your PacketHandler is not saved. You don't have to save it and you are not suppose to do it there. The correct way to do it would be to also send the x, y, z coordinate of the tileentity and then get the tileentity with that coordinate and update the variables in your tileentity.

    But all these are unnecessary because you don't really need to use the packethandler for this assignment at all. I've completed mine without using it. Hint: just update that variable in your tileentity updateEntity() method :)
  • 2013-09-01 10:01:31
    Ok, I have decide to try a different way but the variables still are not being changed even though I don't think they are static. I have tracked the problem down to when the packet is sent but I can't identify the problem. Again any help would be much appreciated.

    Here is the PacketHandler code:

    Thanks again.
  • 2013-09-01 10:03:50
    Ignore that I missed Noobs post as my page did not refresh. I will try that. Thank you for the help it is much appreciated.
  • Log in or sign up to reply to this thread