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

TileEntity Coordinates

  • 2013-11-17 11:27:59
    I have been stuck on this problem for a while and cannot figure out what is wrong. I am convinced it is probably fairly simple to fix but after trying for a number of weeks I cannot see what is wrong.



    The problem is that when the particleTimer == 0 and the coordinates are called for all of the coordinates of this tile entity are given and therefore all the blocks give off particles at the same time. I am not sure if xCoord is sending multiple coordinates the particeTimerStatus is becoming true for all Tile Entities although I wouldn't expect this as I have set parTicleTimerStatus to be private. If someone could look at the code and help me I would be very happy.



    This is the code for the tileEntity if you would like anymore please ask.
    http://pastebin.com/HL5p1h7x
  • 2013-11-17 14:09:42
    The particle timer shouldn't be static.
  • 2013-11-17 14:40:36
    When I remove static it stops the particles from spawning at all.
  • 2013-11-17 15:51:03
    You are trying to spawn particles on client side, but update the timer on server side only. Client won't get info about the timer unless you send it from server, eg. via packet handler. (it's how i've done it)
  • 2013-11-18 02:49:34
    It seems like you have misunderstood the assignment. You do not need to synchronise and have all the block emit particles at the same time. each block should have its own timer and emit particles every 3 seconds from the time it is placed. I think the varaible particleTimerStatus is a little redundant.

    Also, you do not need to use packet handler to complete this assignment.
  • 2013-11-18 15:31:05
    Thanks for all the help. I will try find a solution using the advice given. I'm not trying to sync the blocks I have just done something wrong and that has happened this is what I am trying to solve.
  • 2013-11-18 15:34:56
    I thought using a tile entity would mean that each block had a separate timer and was using particeTimerStatus so I could put the timer on the server and the particles on the client. is this not the case?
  • 2013-11-19 03:00:42
    yes, you are right.
  • 2013-11-19 11:03:59
    No, you're not. The particleTimerStatus isn't doing anything good. It will just tell all timers on the same computer to be the same (client and server). This means all machines will emit particles at the same time, but only on the computer which is running the server.
  • 2013-11-20 02:15:16
    oops, ignore what I said :P I thought you were talking about particleTimer so i said you were right. vswe is right.
  • Log in or sign up to reply to this thread