This commit is contained in:
modmuss50 2019-08-18 14:36:06 +01:00
parent bfb8d81367
commit f53d65ca48
2 changed files with 4 additions and 8 deletions

View file

@ -272,10 +272,8 @@ public class IronAlloyFurnaceBlockEntity extends MachineBaseBlockEntity
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142) return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142)
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.filterSlot(0, 47, 17, .slot(0, 47, 17)
stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(0).test(stack))) .slot(1, 65, 17)
.filterSlot(1, 65, 17,
stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(1).test(stack)))
.outputSlot(2, 116, 35).fuelSlot(3, 56, 53).syncIntegerValue(this::getBurnTime, this::setBurnTime) .outputSlot(2, 116, 35).fuelSlot(3, 56, 53).syncIntegerValue(this::getBurnTime, this::setBurnTime)
.syncIntegerValue(this::getCookTime, this::setCookTime) .syncIntegerValue(this::getCookTime, this::setCookTime)
.syncIntegerValue(this::getCurrentItemBurnTime, this::setCurrentItemBurnTime).addInventory().create(this, syncID); .syncIntegerValue(this::getCurrentItemBurnTime, this::setCurrentItemBurnTime).addInventory().create(this, syncID);

View file

@ -51,10 +51,8 @@ public class AlloySmelterBlockEntity extends GenericMachineBlockEntity implement
public BuiltContainer createContainer(int syncID, final PlayerEntity player) { public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar() return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar()
.addInventory().blockEntity(this) .addInventory().blockEntity(this)
.filterSlot(0, 34, 47, .slot(0, 34, 47)
stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(0).test(stack))) .slot(1, 126, 47)
.filterSlot(1, 126, 47,
stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(1).test(stack)))
.outputSlot(2, 80, 47).energySlot(3, 8, 72).syncEnergyValue().syncCrafterValue().addInventory() .outputSlot(2, 80, 47).energySlot(3, 8, 72).syncEnergyValue().syncCrafterValue().addInventory()
.create(this, syncID); .create(this, syncID);
} }