i want to combust 2: electric boogaloo

This commit is contained in:
Adam 2022-06-21 20:05:03 +02:00 committed by GitHub
parent 905e2646ab
commit 093da728d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket; import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.AuxGaugePacket; import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher; import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.TileEntityLoadedBase; import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.energy.IBatteryItem; import api.hbm.energy.IBatteryItem;
import api.hbm.energy.IEnergyUser; import api.hbm.energy.IEnergyUser;
@ -20,13 +20,13 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase implements ISidedInventory, IEnergyUser { public class TileEntityMachineElectricFurnace extends TileEntityMachineBase implements ISidedInventory, IEnergyUser {
private ItemStack slots[]; private ItemStack slots[];
public int dualCookTime; public int dualCookTime;
public long power; public long power;
public static final long maxPower = 100000; public static long maxPower = 100000;
public int MaxProgress = 100; public int MaxProgress = 100;
int consumption = 50; int consumption = 50;
int progress = 100; int progress = 100;
@ -37,7 +37,8 @@ public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase imple
private String customName; private String customName;
public TileEntityMachineElectricFurnace() { public TileEntityMachineElectricFurnace(){
super(4);
slots = new ItemStack[4]; slots = new ItemStack[4];
} }
@ -303,7 +304,9 @@ public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase imple
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();
data.setLong("powerTime", this.power); data.setLong("powerTime", this.power);
data.setInteger("progress", this.progress); data.setInteger("progress", this.progress);
data.setInteger("cookTime", dualCookTime); data.setInteger("MaxProgress", this.MaxProgress);
data.setInteger("cookTime", this.dualCookTime);
data.setLong("maxPower", this.maxPower);
this.networkPack(data, 50); this.networkPack(data, 50);
{ {
if(hasPower() && canProcess()) if(hasPower() && canProcess())
@ -345,12 +348,6 @@ public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase imple
this.markDirty(); this.markDirty();
} }
} }
private void networkPack(NBTTagCompound data, int i) {
// TODO Auto-generated method stub
}
private void updateConnections() { private void updateConnections() {
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
@ -361,6 +358,8 @@ public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase imple
this.power = nbt.getLong("power"); this.power = nbt.getLong("power");
this.MaxProgress = nbt.getInteger("MaxProgress"); this.MaxProgress = nbt.getInteger("MaxProgress");
this.progress = nbt.getInteger("progress"); this.progress = nbt.getInteger("progress");
this.dualCookTime = nbt.getInteger("cookTime");
this.maxPower = nbt.getLong("maxPower");
} }
@Override @Override
@ -379,4 +378,10 @@ public class TileEntityMachineElectricFurnace extends TileEntityLoadedBase imple
public long getMaxPower() { public long getMaxPower() {
return maxPower; return maxPower;
} }
@Override
public String getName() {
// TODO Auto-generated method stub
return null;
}
} }