Fix thermal generator
This commit is contained in:
parent
c17c49249a
commit
ff8b497c54
6 changed files with 8 additions and 2 deletions
|
@ -27,6 +27,7 @@ package techreborn.blockentity.generator;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import reborncore.api.IToolDrop;
|
import reborncore.api.IToolDrop;
|
||||||
import reborncore.api.blockentity.InventoryProvider;
|
import reborncore.api.blockentity.InventoryProvider;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
|
@ -62,6 +63,7 @@ public abstract class BaseFluidGeneratorBlockEntity extends PowerAcceptorBlockEn
|
||||||
public BaseFluidGeneratorBlockEntity(BlockEntityType<?> blockEntityType, EFluidGenerator type, String blockEntityName, int tankCapacity, int euTick) {
|
public BaseFluidGeneratorBlockEntity(BlockEntityType<?> blockEntityType, EFluidGenerator type, String blockEntityName, int tankCapacity, int euTick) {
|
||||||
super(blockEntityType);
|
super(blockEntityType);
|
||||||
recipes = GeneratorRecipeHelper.getFluidRecipesForGenerator(type);
|
recipes = GeneratorRecipeHelper.getFluidRecipesForGenerator(type);
|
||||||
|
Validate.notNull(recipes, "null recipe list for " + type.getRecipeID());
|
||||||
tank = new Tank(blockEntityName, tankCapacity, this);
|
tank = new Tank(blockEntityName, tankCapacity, this);
|
||||||
inventory = new RebornInventory<>(3, blockEntityName, 64, this);
|
inventory = new RebornInventory<>(3, blockEntityName, 64, this);
|
||||||
this.euTick = euTick;
|
this.euTick = euTick;
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity im
|
||||||
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
||||||
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
||||||
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
||||||
|
.sync(tank)
|
||||||
.addInventory().create(this, syncID);
|
.addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity impleme
|
||||||
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
||||||
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
||||||
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
||||||
|
.sync(tank)
|
||||||
.addInventory().create(this, syncID);
|
.addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity
|
||||||
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
||||||
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
||||||
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
||||||
|
.sync(tank)
|
||||||
.addInventory().create(this, syncID);
|
.addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity i
|
||||||
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
|
||||||
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
|
||||||
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
|
||||||
|
.sync(tank)
|
||||||
.addInventory().create(this, syncID);
|
.addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ package techreborn.init;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
|
import net.minecraft.fluid.Fluids;
|
||||||
import techreborn.api.generator.EFluidGenerator;
|
import techreborn.api.generator.EFluidGenerator;
|
||||||
import techreborn.api.generator.GeneratorRecipeHelper;
|
import techreborn.api.generator.GeneratorRecipeHelper;
|
||||||
import techreborn.init.ModFluids;
|
import techreborn.init.ModFluids;
|
||||||
|
@ -44,8 +45,7 @@ public class FluidGeneratorRecipes {
|
||||||
register(EFluidGenerator.SEMIFLUID, ModFluids.LITHIUM.getFluid(), 60);
|
register(EFluidGenerator.SEMIFLUID, ModFluids.LITHIUM.getFluid(), 60);
|
||||||
register(EFluidGenerator.SEMIFLUID, ModFluids.OIL.getFluid(), 16);
|
register(EFluidGenerator.SEMIFLUID, ModFluids.OIL.getFluid(), 16);
|
||||||
|
|
||||||
//TODO 1.13 forge and mc fluids are 2 diffrent things, fix later
|
register(EFluidGenerator.THERMAL, Fluids.LAVA, 60);
|
||||||
//register(EFluidGenerator.THERMAL, Fluids.LAVA, 60);
|
|
||||||
|
|
||||||
register(EFluidGenerator.GAS, ModFluids.HYDROGEN.getFluid(), 15);
|
register(EFluidGenerator.GAS, ModFluids.HYDROGEN.getFluid(), 15);
|
||||||
register(EFluidGenerator.GAS, ModFluids.METHANE.getFluid(), 45);
|
register(EFluidGenerator.GAS, ModFluids.METHANE.getFluid(), 45);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue