コード例 #1
0
 @Override
 public void setWorldObj(World world) {
   super.setWorldObj(world);
   if (_grindingWorld != null) _grindingWorld.clearReferences();
   if (this.worldObj instanceof WorldServer)
     _grindingWorld = new GrindingWorldServer((WorldServer) this.worldObj, this);
   else _grindingWorld = new GrindingWorld(this.worldObj, this);
 }
コード例 #2
0
 @Override
 public void validate() {
   super.validate();
   if (!worldObj.isRemote) {
     _treeManager =
         new FruitHarvestManager(
             worldObj, new Area(new BlockPosition(this), 0, 0, 0), HarvestMode.FruitTree);
   }
 }
コード例 #3
0
 @Override
 public void readFromNBT(NBTTagCompound nbttagcompound) {
   super.readFromNBT(nbttagcompound);
   _moveOld = nbttagcompound.getByte("moveOld") == 0 ? false : true;
 }
コード例 #4
0
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    nbttagcompound.setByte("moveOld", (byte) (_moveOld ? 1 : 0));
  }