Minecraft.getMinecraft().theWorld.spawnParticle("portal", bc.x + xOff, bc.y + yOff, bc.z + zOff, (rand.nextDouble() - 0.5) * 1.5, -rand.nextDouble(),
(rand.nextDouble() - 0.5) * 1.5);
}
public static void setTankNBT(PacketCombustionTank message, int x, int y, int z) {
TileCombustionGenerator tile = (TileCombustionGenerator) Minecraft.getMinecraft().theWorld.getTileEntity(x, y, z);
if(tile == null) {
//no loaded on client when receiving message, can happen when loading the chunks
return;
}
if(message.nbtRoot.hasKey("coolantTank")) {
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("coolantTank");
tile.getCoolantTank().readFromNBT(tankRoot);
} else {
tile.getCoolantTank().setFluid(null);
}
if(message.nbtRoot.hasKey("fuelTank")) {
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("fuelTank");
tile.getFuelTank().readFromNBT(tankRoot);
} else {
tile.getFuelTank().setFluid(null);
}
}