mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
bug fixes part 2
(both me and radium did testing)
This commit is contained in:
parent
e3cf157501
commit
94c97bc87a
@ -9,6 +9,8 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
import java.nio.BufferOverflowException;
|
||||||
|
|
||||||
public class BufPacket implements IMessage {
|
public class BufPacket implements IMessage {
|
||||||
|
|
||||||
int x;
|
int x;
|
||||||
@ -52,7 +54,7 @@ public class BufPacket implements IMessage {
|
|||||||
|
|
||||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||||
|
|
||||||
if(te instanceof IBufPacketReceiver) {
|
if (te instanceof IBufPacketReceiver) {
|
||||||
((IBufPacketReceiver) te).deserialize(m.buf);
|
((IBufPacketReceiver) te).deserialize(m.buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -279,8 +279,8 @@ public class TileEntityMachineAutosaw extends TileEntityLoadedBase implements IB
|
|||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
buf.writeBoolean(this.isOn);
|
buf.writeBoolean(this.isOn);
|
||||||
buf.writeFloat(this.syncYaw);
|
buf.writeFloat(this.rotationYaw);
|
||||||
buf.writeFloat(this.syncPitch);
|
buf.writeFloat(this.rotationPitch);
|
||||||
this.tank.serialize(buf);
|
this.tank.serialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -200,6 +200,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
|
|||||||
super.serialize(buf);
|
super.serialize(buf);
|
||||||
buf.writeInt(this.playersUsing);
|
buf.writeInt(this.playersUsing);
|
||||||
buf.writeInt(this.setting);
|
buf.writeInt(this.setting);
|
||||||
|
buf.writeLong(this.power);
|
||||||
buf.writeBoolean(this.isOn);
|
buf.writeBoolean(this.isOn);
|
||||||
buf.writeBoolean(this.wasOn);
|
buf.writeBoolean(this.wasOn);
|
||||||
tank.serialize(buf);
|
tank.serialize(buf);
|
||||||
@ -210,6 +211,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
|
|||||||
super.deserialize(buf);
|
super.deserialize(buf);
|
||||||
this.playersUsing = buf.readInt();
|
this.playersUsing = buf.readInt();
|
||||||
this.setting = buf.readInt();
|
this.setting = buf.readInt();
|
||||||
|
this.power = buf.readLong();
|
||||||
this.isOn = buf.readBoolean();
|
this.isOn = buf.readBoolean();
|
||||||
this.wasOn = buf.readBoolean();
|
this.wasOn = buf.readBoolean();
|
||||||
tank.deserialize(buf);
|
tank.deserialize(buf);
|
||||||
|
|||||||
@ -177,6 +177,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
|
super.serialize(buf);
|
||||||
buf.writeLong(this.power);
|
buf.writeLong(this.power);
|
||||||
buf.writeInt(this.lastTargetX);
|
buf.writeInt(this.lastTargetX);
|
||||||
buf.writeInt(this.lastTargetY);
|
buf.writeInt(this.lastTargetY);
|
||||||
|
|||||||
@ -216,8 +216,8 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
|
|||||||
this.temp = buf.readInt();
|
this.temp = buf.readInt();
|
||||||
this.state = buf.readInt();
|
this.state = buf.readInt();
|
||||||
this.autoMode = buf.readBoolean();
|
this.autoMode = buf.readBoolean();
|
||||||
this.powerSliderPos = buf.readInt();
|
|
||||||
this.throttle = buf.readInt();
|
this.throttle = buf.readInt();
|
||||||
|
this.powerSliderPos = buf.readInt();
|
||||||
|
|
||||||
if(state != 1)
|
if(state != 1)
|
||||||
this.counter = buf.readInt();
|
this.counter = buf.readInt();
|
||||||
|
|||||||
@ -402,7 +402,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
|||||||
this.typeLoaded = buf.readInt();
|
this.typeLoaded = buf.readInt();
|
||||||
this.amountLoaded = buf.readInt();
|
this.amountLoaded = buf.readInt();
|
||||||
this.rodLevel = buf.readDouble();
|
this.rodLevel = buf.readDouble();
|
||||||
this.rodTarget = buf.readInt();
|
this.rodTarget = buf.readDouble();
|
||||||
this.coreHeatCapacity = buf.readLong();
|
this.coreHeatCapacity = buf.readLong();
|
||||||
tanks[0].deserialize(buf);
|
tanks[0].deserialize(buf);
|
||||||
tanks[1].deserialize(buf);
|
tanks[1].deserialize(buf);
|
||||||
|
|||||||
@ -219,11 +219,11 @@ public class TileEntitySteamEngine extends TileEntityLoadedBase implements IEner
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserialize(ByteBuf buf) {
|
public void deserialize(ByteBuf buf) {
|
||||||
|
this.tanks[0].deserialize(buf);
|
||||||
this.powerBuffer = buf.readLong();
|
this.powerBuffer = buf.readLong();
|
||||||
this.syncRotor = buf.readFloat();
|
this.syncRotor = buf.readFloat();
|
||||||
this.turnProgress = 3; //use 3-ply for extra smoothness
|
|
||||||
this.tanks[0].deserialize(buf);
|
|
||||||
this.tanks[1].deserialize(buf);
|
this.tanks[1].deserialize(buf);
|
||||||
|
this.turnProgress = 3; //use 3-ply for extra smoothness
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -55,22 +55,22 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendStandard(25);
|
|
||||||
}
|
}
|
||||||
this.worldObj.theProfiler.endSection();
|
this.worldObj.theProfiler.endSection();
|
||||||
|
sendStandard(25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
for(int i = 0; i < 5; i++)
|
for(FluidTank tank : tanks)
|
||||||
tanks[i].serialize(buf);
|
tank.serialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserialize(ByteBuf buf) {
|
public void deserialize(ByteBuf buf) {
|
||||||
for(int i = 0; i < 5; i++)
|
for(FluidTank tank : tanks)
|
||||||
tanks[i].deserialize(buf);
|
tank.deserialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateConnections() {
|
private void updateConnections() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user