Skip to content

Commit

Permalink
Fix client inserting items into printer output
Browse files Browse the repository at this point in the history
  • Loading branch information
KosmosPrime committed Nov 26, 2022
1 parent a862b75 commit 71ce028
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/li/cil/oc/common/container/Printer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import net.minecraft.entity.player.PlayerInventory
import net.minecraft.item.ItemStack
import net.minecraft.inventory.IInventory
import net.minecraft.inventory.container.ContainerType
import net.minecraft.inventory.container.{Slot => BaseSlot}
import net.minecraft.nbt.CompoundNBT

class Printer(selfType: ContainerType[_ <: Printer], id: Int, playerInventory: PlayerInventory, val printer: IInventory)
Expand All @@ -27,7 +28,9 @@ class Printer(selfType: ContainerType[_ <: Printer], id: Int, playerInventory: P
PrintData.inkValue(stack) > 0
}
})
addSlotToContainer(152, 35)
addSlot(new BaseSlot(otherInventory, slots.size, 152, 35) {
override def mayPlace(stack: ItemStack): Boolean = false
})

// Show the player's inventory.
addPlayerInventorySlots(8, 84)
Expand Down

0 comments on commit 71ce028

Please sign in to comment.