Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //For _both_ client and server entity file, have this in your constructor, using health integer for example
- //18 is the id (the max is 31)
- dataWatcher.addObject(18, new Integer(health));
- //then simply access and set the variable using 2 functions
- //get
- dataWatcher.getWatchableObjectInt(18)
- //set
- dataWatcher.updateObject(18, Integer.valueOf(health));
- //and thats it, the rest is magic :D
Add Comment
Please, Sign In to add comment