Attempt to fix packet issue with nuclear boiler
This commit is contained in:
parent
6a90fe67b9
commit
2d3a2bd3e1
1 changed files with 11 additions and 4 deletions
|
@ -29,9 +29,16 @@ object TileNuclearBoiler
|
||||||
class TileNuclearBoiler extends TileElectricInventory(Material.iron) with IPacketReceiver with IFluidHandler with IRotatable
|
class TileNuclearBoiler extends TileElectricInventory(Material.iron) with IPacketReceiver with IFluidHandler with IRotatable
|
||||||
{
|
{
|
||||||
final val SHI_JIAN: Int = 20 * 15
|
final val SHI_JIAN: Int = 20 * 15
|
||||||
@Synced final val waterTank: FluidTank = new FluidTank(AtomicContent.FLUIDSTACK_WATER.copy, FluidContainerRegistry.BUCKET_VOLUME * 5)
|
|
||||||
@Synced final val gasTank: FluidTank = new FluidTank(AtomicContent.FLUIDSTACK_URANIUM_HEXAFLOURIDE.copy, FluidContainerRegistry.BUCKET_VOLUME * 5)
|
@Synced
|
||||||
@Synced var timer: Int = 0
|
final val waterTank: FluidTank = new FluidTank(AtomicContent.FLUIDSTACK_WATER.copy, FluidContainerRegistry.BUCKET_VOLUME * 5)
|
||||||
|
|
||||||
|
@Synced
|
||||||
|
final val gasTank: FluidTank = new FluidTank(AtomicContent.FLUIDSTACK_URANIUM_HEXAFLOURIDE.copy, FluidContainerRegistry.BUCKET_VOLUME * 5)
|
||||||
|
|
||||||
|
@Synced
|
||||||
|
var timer: Int = 0
|
||||||
|
|
||||||
var rotation: Float = 0
|
var rotation: Float = 0
|
||||||
|
|
||||||
//Constructor
|
//Constructor
|
||||||
|
@ -110,9 +117,9 @@ class TileNuclearBoiler extends TileElectricInventory(Material.iron) with IPacke
|
||||||
|
|
||||||
def read(data: ByteBuf, player: EntityPlayer, `type`: PacketType)
|
def read(data: ByteBuf, player: EntityPlayer, `type`: PacketType)
|
||||||
{
|
{
|
||||||
this.timer = data.readInt
|
|
||||||
this.waterTank.setFluid(new FluidStack(AtomicContent.FLUIDSTACK_WATER.fluidID, data.readInt))
|
this.waterTank.setFluid(new FluidStack(AtomicContent.FLUIDSTACK_WATER.fluidID, data.readInt))
|
||||||
this.gasTank.setFluid(new FluidStack(AtomicContent.FLUIDSTACK_URANIUM_HEXAFLOURIDE.fluidID, data.readInt))
|
this.gasTank.setFluid(new FluidStack(AtomicContent.FLUIDSTACK_URANIUM_HEXAFLOURIDE.fluidID, data.readInt))
|
||||||
|
this.timer = data.readInt
|
||||||
}
|
}
|
||||||
|
|
||||||
override def getDescriptionPacket: Packet =
|
override def getDescriptionPacket: Packet =
|
||||||
|
|
Loading…
Reference in a new issue