mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fix TE resyncs sending a bit too much stuff
This commit is contained in:
32 files changed
+97
-99
No files matched your search
@@ -266,13 +266,13 @@ public class TileAlfPortal extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_TICKS_OPEN, ticksOpen);
|
||||
cmp.setInteger(TAG_TICKS_SINCE_LAST_ITEM, ticksSinceLastItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
ticksOpen = cmp.getInteger(TAG_TICKS_OPEN);
|
||||
ticksSinceLastItem = cmp.getInteger(TAG_TICKS_SINCE_LAST_ITEM);
|
||||
}
|
||||
|
||||
@@ -283,8 +283,8 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
|
||||
cmp.setBoolean(TAG_HAS_WATER, hasWater());
|
||||
cmp.setBoolean(TAG_HAS_LAVA, hasLava());
|
||||
@@ -292,8 +292,8 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
|
||||
hasWater = cmp.getBoolean(TAG_HAS_WATER);
|
||||
hasLava = cmp.getBoolean(TAG_HAS_LAVA);
|
||||
|
||||
@@ -51,16 +51,16 @@ public class TileAvatar extends TileSimpleInventory implements IAvatarTile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
par1nbtTagCompound.setBoolean(TAG_ENABLED, enabled);
|
||||
par1nbtTagCompound.setInteger(TAG_TICKS_ELAPSED, ticksElapsed);
|
||||
par1nbtTagCompound.setInteger(TAG_MANA, mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
enabled = par1nbtTagCompound.getBoolean(TAG_ENABLED);
|
||||
ticksElapsed = par1nbtTagCompound.getInteger(TAG_TICKS_ELAPSED);
|
||||
mana = par1nbtTagCompound.getInteger(TAG_MANA);
|
||||
|
||||
@@ -174,15 +174,15 @@ public class TileBrewery extends TileSimpleInventory implements IManaReceiver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
|
||||
par1nbtTagCompound.setInteger(TAG_MANA, mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
|
||||
mana = par1nbtTagCompound.getInteger(TAG_MANA);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ public class TileCacophonium extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
|
||||
NBTTagCompound cmp1 = new NBTTagCompound();
|
||||
if(stack != null)
|
||||
@@ -35,8 +35,8 @@ public class TileCacophonium extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
|
||||
NBTTagCompound cmp1 = cmp.getCompoundTag(TAG_STACK);
|
||||
stack = ItemStack.loadItemStackFromNBT(cmp1);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class TileCamo extends TileMod {
|
||||
public IBlockState camoState;
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
if(camoState != null) {
|
||||
cmp.setString(TAG_CAMO, Block.REGISTRY.getNameForObject(camoState.getBlock()).toString());
|
||||
cmp.setInteger(TAG_CAMO_META, camoState.getBlock().getMetaFromState(camoState));
|
||||
@@ -33,7 +33,7 @@ public class TileCamo extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
Block b = Block.getBlockFromName(cmp.getString(TAG_CAMO));
|
||||
if (b != null) {
|
||||
camoState = b.getStateFromMeta(cmp.getInteger(TAG_CAMO_META));
|
||||
|
||||
@@ -53,7 +53,7 @@ public class TileCell extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_GENERATION, generation);
|
||||
cmp.setBoolean(TAG_TICKED, ticked);
|
||||
if(ticked) {
|
||||
@@ -67,7 +67,7 @@ public class TileCell extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
generation = cmp.getInteger(TAG_GENERATION);
|
||||
ticked = cmp.getBoolean(TAG_TICKED);
|
||||
if(ticked) {
|
||||
|
||||
@@ -105,13 +105,13 @@ public class TileCocoon extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_TIME_PASSED, timePassed);
|
||||
cmp.setInteger(TAG_EMERALDS_GIVEN, emeraldsGiven);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
timePassed = cmp.getInteger(TAG_TIME_PASSED);
|
||||
emeraldsGiven = cmp.getInteger(TAG_EMERALDS_GIVEN);
|
||||
}
|
||||
|
||||
@@ -174,14 +174,14 @@ public class TileCraftCrate extends TileOpenCrate {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
par1nbtTagCompound.setInteger(TAG_PATTERN, pattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
pattern = par1nbtTagCompound.getInteger(TAG_PATTERN);
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
cmp.setInteger(TAG_MANA_REQUIRED, manaRequired);
|
||||
cmp.setInteger(TAG_STAGE, stage);
|
||||
@@ -332,7 +332,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
mana = cmp.getInteger(TAG_MANA);
|
||||
manaRequired = cmp.getInteger(TAG_MANA_REQUIRED);
|
||||
stage = cmp.getInteger(TAG_STAGE);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class TileFakeAir extends TileMod {
|
||||
private static final String TAG_FLOWER_Y = "flowerY";
|
||||
private static final String TAG_FLOWER_Z = "flowerZ";
|
||||
|
||||
private BlockPos flowerPos;
|
||||
private BlockPos flowerPos = BlockPos.ORIGIN;
|
||||
|
||||
public void setFlower(TileEntity tile) {
|
||||
flowerPos = tile.getPos();
|
||||
|
||||
@@ -46,12 +46,12 @@ public class TileFloatingFlower extends TileMod implements IFloatingFlower {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setString(TAG_ISLAND_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
type = IslandType.ofType(cmp.getString(TAG_ISLAND_TYPE));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,14 +41,14 @@ public class TileFloatingSpecialFlower extends TileSpecialFlower implements IFlo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
cmp.setString(TAG_ISLAND_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
type = IslandType.ofType(cmp.getString(TAG_ISLAND_TYPE));
|
||||
}
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ public class TileHourglass extends TileSimpleInventory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
par1nbtTagCompound.setInteger(TAG_TIME, time);
|
||||
par1nbtTagCompound.setFloat(TAG_TIME_FRACTION, timeFraction);
|
||||
par1nbtTagCompound.setBoolean(TAG_FLIP, flip);
|
||||
@@ -120,8 +120,8 @@ public class TileHourglass extends TileSimpleInventory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
time = par1nbtTagCompound.getInteger(TAG_TIME);
|
||||
timeFraction = par1nbtTagCompound.getFloat(TAG_TIME_FRACTION);
|
||||
flip = par1nbtTagCompound.getBoolean(TAG_FLIP);
|
||||
|
||||
@@ -105,15 +105,15 @@ public class TileIncensePlate extends TileSimpleInventory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
par1nbtTagCompound.setInteger(TAG_TIME_LEFT, timeLeft);
|
||||
par1nbtTagCompound.setBoolean(TAG_BURNING, burning);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
timeLeft = par1nbtTagCompound.getInteger(TAG_TIME_LEFT);
|
||||
burning = par1nbtTagCompound.getBoolean(TAG_BURNING);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
bindPos = new BlockPos(
|
||||
cmp.getInteger(TAG_BIND_X),
|
||||
cmp.getInteger(TAG_BIND_Y),
|
||||
@@ -172,7 +172,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_BIND_X, bindPos.getX());
|
||||
cmp.setInteger(TAG_BIND_Y, bindPos.getY());
|
||||
cmp.setInteger(TAG_BIND_Z, bindPos.getZ());
|
||||
|
||||
@@ -69,12 +69,12 @@ public class TileManaFlame extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_COLOR, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
color = cmp.getInteger(TAG_COLOR);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TileMod extends TileEntity implements ITickable {
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
NBTTagCompound ret = super.writeToNBT(par1nbtTagCompound);
|
||||
writeCustomNBT(ret);
|
||||
writePacketNBT(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -45,26 +45,24 @@ public class TileMod extends TileEntity implements ITickable {
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readFromNBT(par1nbtTagCompound);
|
||||
readCustomNBT(par1nbtTagCompound);
|
||||
readPacketNBT(par1nbtTagCompound);
|
||||
}
|
||||
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
// NO-OP
|
||||
}
|
||||
public void writePacketNBT(NBTTagCompound cmp) {}
|
||||
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
// NO-OP
|
||||
}
|
||||
public void readPacketNBT(NBTTagCompound cmp) {}
|
||||
|
||||
@Override
|
||||
public final SPacketUpdateTileEntity getUpdatePacket() {
|
||||
return new SPacketUpdateTileEntity(pos, -999, getUpdateTag());
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writePacketNBT(tag);
|
||||
return new SPacketUpdateTileEntity(pos, -999, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
|
||||
super.onDataPacket(net, packet);
|
||||
readCustomNBT(packet.getNbtCompound());
|
||||
readPacketNBT(packet.getNbtCompound());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -272,16 +272,16 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
|
||||
par1nbtTagCompound.setInteger(TAG_MANA, mana);
|
||||
par1nbtTagCompound.setInteger(TAG_MANA_TO_GET, manaToGet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
|
||||
mana = par1nbtTagCompound.getInteger(TAG_MANA);
|
||||
manaToGet = par1nbtTagCompound.getInteger(TAG_MANA_TO_GET);
|
||||
|
||||
@@ -25,13 +25,13 @@ public abstract class TileSimpleInventory extends TileMod {
|
||||
protected SimpleItemStackHandler itemHandler = createItemHandler();
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
public void readPacketNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
itemHandler = createItemHandler();
|
||||
itemHandler.deserializeNBT(par1NBTTagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
public void writePacketNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.merge(itemHandler.serializeNBT());
|
||||
}
|
||||
|
||||
|
||||
@@ -155,12 +155,12 @@ public class TileSpawnerClaw extends TileMod implements IManaReceiver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
mana = cmp.getInteger(TAG_MANA);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,8 +106,8 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
|
||||
cmp.setString(TAG_SUBTILE_NAME, subTileName);
|
||||
NBTTagCompound subCmp = new NBTTagCompound();
|
||||
@@ -118,8 +118,8 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
|
||||
subTileName = cmp.getString(TAG_SUBTILE_NAME);
|
||||
NBTTagCompound subCmp = cmp.getCompoundTag(TAG_SUBTILE_CMP);
|
||||
|
||||
@@ -187,12 +187,12 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
mana = cmp.getInteger(TAG_MANA);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ public class TileTinyPotato extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setString(TAG_NAME, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
name = cmp.getString(TAG_NAME);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -115,8 +115,8 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeCustomNBT(par1nbtTagCompound);
|
||||
public void writePacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writePacketNBT(par1nbtTagCompound);
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(requestTarget != null)
|
||||
requestTarget.writeToNBT(cmp);
|
||||
@@ -125,8 +125,8 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readCustomNBT(par1nbtTagCompound);
|
||||
public void readPacketNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readPacketNBT(par1nbtTagCompound);
|
||||
NBTTagCompound cmp = par1nbtTagCompound.getCompoundTag(TAG_REQUEST_TARGET);
|
||||
requestTarget = ItemStack.loadItemStackFromNBT(cmp);
|
||||
itemCount = par1nbtTagCompound.getInteger(TAG_ITEM_COUNT);
|
||||
|
||||
@@ -71,8 +71,8 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
|
||||
cmp.setBoolean(TAG_PENDING_REQUEST, pendingRequest);
|
||||
cmp.setInteger(TAG_REQUEST_X, requestPos.getX());
|
||||
@@ -99,8 +99,8 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
|
||||
pendingRequest = cmp.getBoolean(TAG_PENDING_REQUEST);
|
||||
int x = cmp.getInteger(TAG_REQUEST_X);
|
||||
|
||||
@@ -122,12 +122,12 @@ public class TileBellows extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setBoolean(TAG_ACTIVE, active);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
active = cmp.getBoolean(TAG_ACTIVE);
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
cmp.setBoolean(TAG_OUTPUTTING, outputting);
|
||||
cmp.setInteger(TAG_COLOR, color.getMetadata());
|
||||
@@ -318,7 +318,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
mana = cmp.getInteger(TAG_MANA);
|
||||
outputting = cmp.getBoolean(TAG_OUTPUTTING);
|
||||
color = EnumDyeColor.byMetadata(cmp.getInteger(TAG_COLOR));
|
||||
@@ -351,7 +351,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
writeCustomNBT(nbttagcompound);
|
||||
writePacketNBT(nbttagcompound);
|
||||
nbttagcompound.setInteger(TAG_KNOWN_MANA, getCurrentMana());
|
||||
if(player instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) player).connection.sendPacket(new SPacketUpdateTileEntity(pos, -999, nbttagcompound));
|
||||
|
||||
@@ -121,12 +121,12 @@ public class TilePump extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setBoolean(TAG_ACTIVE, active);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
boolean prevActive = active;
|
||||
active = cmp.getBoolean(TAG_ACTIVE);
|
||||
if(worldObj != null && worldObj.isRemote)
|
||||
|
||||
@@ -121,12 +121,12 @@ public class TileRFGenerator extends TileMod implements IManaReceiver, IEnergyCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
mana = cmp.getInteger(TAG_MANA);
|
||||
}
|
||||
|
||||
|
||||
@@ -270,8 +270,8 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
super.writePacketNBT(cmp);
|
||||
|
||||
UUID identity = getIdentifier();
|
||||
cmp.setBoolean(TAG_HAS_IDENTITY, true);
|
||||
@@ -309,8 +309,8 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
super.readPacketNBT(cmp);
|
||||
|
||||
if(cmp.getBoolean(TAG_HAS_IDENTITY)) {
|
||||
long most = cmp.getLong(TAG_UUID_MOST);
|
||||
@@ -383,7 +383,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
if(!player.isSneaking()) {
|
||||
if(!worldObj.isRemote) {
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
writeCustomNBT(nbttagcompound);
|
||||
writePacketNBT(nbttagcompound);
|
||||
nbttagcompound.setInteger(TAG_KNOWN_MANA, mana);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) player).connection.sendPacket(new SPacketUpdateTileEntity(pos, -999, nbttagcompound));
|
||||
|
||||
@@ -55,13 +55,13 @@ public class TileTurntable extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
public void writePacketNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_SPEED, speed);
|
||||
cmp.setBoolean(TAG_BACKWARDS, backwards);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
public void readPacketNBT(NBTTagCompound cmp) {
|
||||
speed = cmp.getInteger(TAG_SPEED);
|
||||
backwards = cmp.getBoolean(TAG_BACKWARDS);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user