mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 11:53:29 +01:00
fixed a dupe glitch when two people are using a crafting terminal
Closes #96
This commit is contained in:
parent
6a170a1ace
commit
463e4378bb
1 changed files with 7 additions and 1 deletions
|
@ -29,7 +29,12 @@ public class CraftingTerminalContainer extends ItemTerminalContainer {
|
|||
@Override
|
||||
protected void addOwnSlots(Player player) {
|
||||
this.craftInventory = new WrappedCraftingInventory(this.getTile().craftItems, this, 3, 3);
|
||||
this.craftResult = new ResultContainer();
|
||||
this.craftResult = new ResultContainer() {
|
||||
@Override
|
||||
public void setChanged() {
|
||||
CraftingTerminalContainer.this.slotsChanged(this);
|
||||
}
|
||||
};
|
||||
this.addSlot(new ResultSlot(player, this.craftInventory, this.craftResult, 0, 25, 77));
|
||||
for (var i = 0; i < 3; i++)
|
||||
for (var j = 0; j < 3; j++)
|
||||
|
@ -39,6 +44,7 @@ public class CraftingTerminalContainer extends ItemTerminalContainer {
|
|||
|
||||
@Override
|
||||
public void slotsChanged(Container inventoryIn) {
|
||||
super.slotsChanged(inventoryIn);
|
||||
if (!this.player.level.isClientSide) {
|
||||
var ret = ItemStack.EMPTY;
|
||||
var optional = this.player.level.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, this.craftInventory, this.player.level);
|
||||
|
|
Loading…
Reference in a new issue