About to give up. Here is what ive got.
This commit is contained in:
parent
34530fa6ca
commit
0749385e49
14 changed files with 41 additions and 131 deletions
|
@ -91,13 +91,6 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate(){
|
||||
energy.invalidate();
|
||||
|
|
|
@ -102,14 +102,6 @@ public class TileAssemblingMachine extends TileMachineBase implements IWrenchabl
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -109,14 +109,6 @@ public class TileCentrifuge extends TileMachineBase implements IWrenchable, IEn
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -102,14 +102,6 @@ public class TileChemicalReactor extends TileMachineBase implements IWrenchable,
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -98,16 +98,7 @@ public class TileGrinder extends TileMachineBase implements IWrenchable, IEnergy
|
|||
tank.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
tank.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
energy.invalidate();
|
||||
|
|
|
@ -123,13 +123,6 @@ public class TileHeatGenerator extends TileMachineBase implements IWrenchable, I
|
|||
energy.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addWailaInfo(List<String> info)
|
||||
{
|
||||
|
|
|
@ -95,14 +95,6 @@ public class TileImplosionCompressor extends TileMachineBase implements IWrencha
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addWailaInfo(List<String> info)
|
||||
{
|
||||
|
|
|
@ -100,14 +100,6 @@ public class TileIndustrialElectrolyzer extends TileMachineBase implements IWren
|
|||
energy.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -104,14 +104,6 @@ public class TileIndustrialSawmill extends TileMachineBase implements IWrenchabl
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -101,14 +101,6 @@ public class TileLathe extends TileMachineBase implements IWrenchable, IEnergyTi
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -11,42 +11,24 @@ import techreborn.packets.PacketHandler;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class TileMachineBase extends TileEntity {
|
||||
public abstract class TileMachineBase extends TileEntity {
|
||||
|
||||
public boolean needsSync = false;
|
||||
public int ticksSinceLastSync = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
//Force a sync evey 10 seconds
|
||||
if(needsSync && !worldObj.isRemote){
|
||||
syncWithAll();
|
||||
@Deprecated
|
||||
/**
|
||||
* Try not to use this
|
||||
*/
|
||||
public void syncWithAll() {
|
||||
if (!worldObj.isRemote) {
|
||||
PacketHandler.sendPacketToAllPlayers(getDescriptionPacket(),
|
||||
worldObj);
|
||||
}
|
||||
ticksSinceLastSync ++;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addWailaInfo(List<String> info) {
|
||||
|
||||
}
|
||||
|
||||
public void syncWithAll() {
|
||||
if (!worldObj.isRemote) {
|
||||
PacketHandler.sendPacketToAllPlayers(getSyncPacket(),
|
||||
worldObj);
|
||||
}
|
||||
needsSync = false;
|
||||
ticksSinceLastSync = 0;
|
||||
}
|
||||
|
||||
public Packet getSyncPacket() {
|
||||
NBTTagCompound nbtTag = new NBTTagCompound();
|
||||
writeSyncToNBT(nbtTag);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord,
|
||||
this.zCoord, 1, nbtTag);
|
||||
}
|
||||
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbtTag = new NBTTagCompound();
|
||||
writeToNBT(nbtTag);
|
||||
|
@ -61,9 +43,4 @@ public class TileMachineBase extends TileEntity {
|
|||
readFromNBT(packet.func_148857_g());
|
||||
}
|
||||
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -83,13 +83,6 @@ public class TileMatterFabricator extends TileMachineBase implements IWrenchable
|
|||
energy.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
|
|
|
@ -101,14 +101,6 @@ public class TilePlateCuttingMachine extends TileMachineBase implements IWrencha
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeSyncToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addWailaInfo(List<String> info)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue