Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onUpdate()
- {
- super.onUpdate();
- if (!this.worldObj.isRemote)
- {
- this.setBesideClimbableBlock(this.isCollidedHorizontally);
- }
- }
- public boolean isOnLadder()
- {
- return this.isBesideClimbableBlock();
- }
- protected void entityInit()
- {
- super.entityInit();
- this.dataWatcher.addObject(16, new Byte((byte)0));
- }
- public double getMountedYOffset()
- {
- return (double)(this.height * 0.5F);
- }
- public boolean isBesideClimbableBlock()
- {
- return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
- }
- public void setBesideClimbableBlock(boolean p_70839_1_)
- {
- byte b0 = this.dataWatcher.getWatchableObjectByte(16);
- if (p_70839_1_)
- {
- b0 = (byte)(b0 | 1);
- }
- else
- {
- b0 = (byte)(b0 & -2);
- }
- this.dataWatcher.updateObject(16, Byte.valueOf(b0));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement