예제 #1
0
 @Override
 public void b(NBTTagCompound nbttagcompound) {
   super.b(nbttagcompound);
   flow.writeToNBT(nbttagcompound);
   nbttagcompound.setByte("lDir", lastDir);
   nbttagcompound.setByte("pCol", paintColor);
 }
예제 #2
0
 @Override
 public void a(NBTTagCompound nbttagcompound) {
   super.a(nbttagcompound);
   flow.readFromNBT(nbttagcompound);
   lastDir = nbttagcompound.getByte("lDir");
   paintColor = nbttagcompound.getByte("pCol");
 }
예제 #3
0
 @Override
 public void addTubeItem(TubeItem tubeitem) {
   tubeitem.side ^= 1;
   flow.add(tubeitem);
   hasChanged = true;
   dirtyBlock();
 }
예제 #4
0
 @Override
 public void onHarvestPart(EntityHuman entityhuman, int i) {
   if (i == 29) {
     CoreLib.dropItem(
         world, x, y, z, new ItemStack(RedPowerBase.blockMicro.id, 1, getExtendedID() << 8));
     flow.onRemove();
     if (CoverSides > 0) {
       replaceWithCovers();
     } else {
       deleteBlock();
     }
   } else {
     super.onHarvestPart(entityhuman, i);
   }
 }
예제 #5
0
 @Override
 public boolean tubeItemEnter(int i, int j, TubeItem tubeitem) {
   if (j != 0) {
     return false;
   }
   if (tubeitem.color != 0 && paintColor != 0 && tubeitem.color != paintColor) {
     return false;
   } else {
     tubeitem.side = (byte) i;
     flow.add(tubeitem);
     hasChanged = true;
     dirtyBlock();
     return true;
   }
 }
예제 #6
0
  @Override
  public void q_() {
    if (flow.update()) {
      hasChanged = true;
    }

    if (hasChanged) {
      hasChanged = false;

      if (CoreProxy.isServer()) {
        sendItemUpdate();
      }

      dirtyBlock();
    }
  }