Skip to content

Commit d9f1f30

Browse files
committed
bye schematilag
1 parent 9517566 commit d9f1f30

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/com/simibubi/create/content/schematics/cannon/SchematicannonBlockEntity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ protected void initializePrinter(ItemStack blueprint) {
476476
.closerThan(getBlockPos(), MAX_ANCHOR_DISTANCE)) {
477477
state = State.STOPPED;
478478
statusMsg = "targetOutsideRange";
479+
inventory.setStackInSlot(1, inventory.getStackInSlot(0).copy());
480+
inventory.setStackInSlot(0, ItemStack.EMPTY);
479481
printer.resetSchematic();
480482
sendUpdate = true;
481483
return;
@@ -569,8 +571,7 @@ public void finishedPrinting() {
569571
if (replaceMode == ConfigureSchematicannonPacket.Option.REPLACE_EMPTY.ordinal())
570572
printer.sendBlockUpdates(level);
571573
inventory.setStackInSlot(0, ItemStack.EMPTY);
572-
inventory.setStackInSlot(1, new ItemStack(AllItems.EMPTY_SCHEMATIC.get(), inventory.getStackInSlot(1)
573-
.getCount() + 1));
574+
inventory.setStackInSlot(1, new ItemStack(AllItems.EMPTY_SCHEMATIC.get()));
574575
state = State.STOPPED;
575576
statusMsg = "finished";
576577
resetPrinter();

src/main/java/com/simibubi/create/content/schematics/cannon/SchematicannonInventory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected void onContentsChanged(int slot) {
2525
public boolean isItemValid(int slot, ItemStack stack) {
2626
switch (slot) {
2727
case 0: // Blueprint Slot
28-
return AllItems.SCHEMATIC.isIn(stack);
28+
return getStackInSlot(1).isEmpty() && AllItems.SCHEMATIC.isIn(stack);
2929
case 1: // Blueprint output
3030
return false;
3131
case 2: // Book input

0 commit comments

Comments
 (0)