@Override public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); flow.writeToNBT(nbttagcompound); nbttagcompound.setByte("lDir", lastDir); nbttagcompound.setByte("pCol", paintColor); }
@Override public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); flow.readFromNBT(nbttagcompound); lastDir = nbttagcompound.getByte("lDir"); paintColor = nbttagcompound.getByte("pCol"); }
@Override public void addTubeItem(TubeItem tubeitem) { tubeitem.side ^= 1; flow.add(tubeitem); hasChanged = true; dirtyBlock(); }
@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); } }
@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; } }
@Override public void q_() { if (flow.update()) { hasChanged = true; } if (hasChanged) { hasChanged = false; if (CoreProxy.isServer()) { sendItemUpdate(); } dirtyBlock(); } }