Use MatteryContainer instead of Mojang's SimpleContainer in matter entangler quantum linking

This commit is contained in:
DBotThePony 2025-02-22 13:26:58 +07:00
parent a93d754a68
commit 28c7459b82
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -75,7 +75,8 @@ class MatterEntanglerMenu(
private fun rescan() {
if (player is ServerPlayer && entangling[0].item is IQuantumLinked && entangling[1].item == entangling[0].item && entangling[0].isNotEmpty && entangling[1].isNotEmpty) {
entanglingC.container[0] = (entangling[0].item as IQuantumLinked).merge(entangling[0], entangling[1])
val result = (entangling[0].item as IQuantumLinked).merge(entangling[0], entangling[1])
entanglingC.container[0] = result
} else if (player is ServerPlayer) {
entanglingC.container[0] = ItemStack.EMPTY
}
@ -89,7 +90,7 @@ class MatterEntanglerMenu(
val entanglingA: MatterySlot = EntanglingInputSlot(0)
val entanglingB: MatterySlot = EntanglingInputSlot(1)
val entanglingC: MatterySlot = object : MatterySlot(SimpleContainer(1), 0) {
val entanglingC: MatterySlot = object : MatterySlot(MatteryContainer(1), 0) {
override fun mayPlace(itemStack: ItemStack): Boolean {
return false
}