Fix thermal generator

This commit is contained in:
modmuss50 2019-08-13 11:45:25 +01:00
parent c17c49249a
commit ff8b497c54
6 changed files with 8 additions and 2 deletions

View file

@ -27,6 +27,7 @@ package techreborn.blockentity.generator;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.Direction;
import org.apache.commons.lang3.Validate;
import reborncore.api.IToolDrop;
import reborncore.api.blockentity.InventoryProvider;
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) {
super(blockEntityType);
recipes = GeneratorRecipeHelper.getFluidRecipesForGenerator(type);
Validate.notNull(recipes, "null recipe list for " + type.getRecipeID());
tank = new Tank(blockEntityName, tankCapacity, this);
inventory = new RebornInventory<>(3, blockEntityName, 64, this);
this.euTick = euTick;

View file

@ -62,6 +62,7 @@ public class DieselGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity im
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
.sync(tank)
.addInventory().create(this, syncID);
}
}

View file

@ -62,6 +62,7 @@ public class GasTurbineBlockEntity extends BaseFluidGeneratorBlockEntity impleme
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
.sync(tank)
.addInventory().create(this, syncID);
}
}

View file

@ -62,6 +62,7 @@ public class SemiFluidGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
.sync(tank)
.addInventory().create(this, syncID);
}
}

View file

@ -62,6 +62,7 @@ public class ThermalGeneratorBlockEntity extends BaseFluidGeneratorBlockEntity i
.addInventory().blockEntity(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue()
.syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange)
.syncIntegerValue(this::getTankAmount, this::setTankAmount)
.sync(tank)
.addInventory().create(this, syncID);
}
}

View file

@ -26,6 +26,7 @@ package techreborn.init;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import techreborn.api.generator.EFluidGenerator;
import techreborn.api.generator.GeneratorRecipeHelper;
import techreborn.init.ModFluids;
@ -44,8 +45,7 @@ public class FluidGeneratorRecipes {
register(EFluidGenerator.SEMIFLUID, ModFluids.LITHIUM.getFluid(), 60);
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.METHANE.getFluid(), 45);