mirror of
https://github.com/GTNewHorizons/BetterP2P.git
synced 2026-11-26 06:42:58 +00:00
Fix the AMC eating a static p2p without changing type
This commit is contained in:
1 parent
2d432bc27c
commit
2e0a69441c
1 file changed
+1
-2
@@ -197,9 +197,8 @@ fun changeAllP2Ps(tunnel: PartP2PTunnel<*>, newType: TunnelInfo, player: EntityP
|
||||
if (newType.clazz.superclass == PartP2PTunnelStatic::class.java) {
|
||||
val amt = outputs.size + 1
|
||||
var hasItems = false
|
||||
for ((i, stack) in player.inventory.mainInventory.withIndex()) {
|
||||
for (stack in player.inventory.mainInventory) {
|
||||
if (stack?.isItemEqual(newType.stack) == true && stack.stackSize >= amt) {
|
||||
player.inventory.decrStackSize(i, 1)
|
||||
hasItems = true
|
||||
break
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user