Essentia Gen update 2.0

+ changed Generators outputting GTEU
+ renamed "tileentityperditiogenerator" -> "tileentitylucrumgenerator"
+ created WiP autogeneratedgens (not working, disabled atm)
This commit is contained in:
LOKKO12 committed 2018-02-26 21:22:00 +01:00
1 parent 9a1a1bbf3f
commit be6fc768f8
18 files changed
+1198 -548

No files matched your search

+44 -42
View File
@@ -5,47 +5,49 @@ import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public abstract class TileEntityEMT extends TileEntity {
public int facing;
public boolean isOn;
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
facing = tagCompound.getInteger("facing");
isOn = tagCompound.getBoolean("isOn");
}
@Override
public void writeToNBT(NBTTagCompound tagCompound) {
tagCompound.setInteger("facing", facing);
tagCompound.setBoolean("isOn", isOn);
super.writeToNBT(tagCompound);
}
@Override
public final Packet getDescriptionPacket() {
NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt);
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt);
return packet;
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
NBTTagCompound nbt = pkt.func_148857_g();
readFromNBT(nbt);
}
@Override
public void markDirty() {
super.markDirty();
if (worldObj.isRemote) {
return;
}
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
public class TileEntityEMT
extends TileEntity
{
public int facing;
public boolean isOn;
public void readFromNBT(NBTTagCompound tagCompound)
{
super.readFromNBT(tagCompound);
this.facing = tagCompound.getInteger("facing");
this.isOn = tagCompound.getBoolean("isOn");
}
public void writeToNBT(NBTTagCompound tagCompound)
{
tagCompound.setInteger("facing", this.facing);
tagCompound.setBoolean("isOn", this.isOn);
super.writeToNBT(tagCompound);
}
public final Packet getDescriptionPacket()
{
NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt);
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
return packet;
}
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
NBTTagCompound nbt = pkt.func_148857_g();
readFromNBT(nbt);
}
public void markDirty()
{
super.markDirty();
if (this.worldObj.isRemote) {
return;
}
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
}
}