Пример #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();
    }
  }