Skip to content

Commit d35b03c

Browse files
committed
Don't waste a single point of media in edge cases
1 parent 42f22f9 commit d35b03c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Common/src/main/kotlin/gay/object/hexdebug/blocks/splicing/SplicingTableBlockEntity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,11 @@ class SplicingTableBlockEntity(pos: BlockPos, state: BlockState) :
448448
// avoid wasting media if the item is too large
449449
if (extractMedia(mediaHolder, cost = cost, simulate = true) !in 1..cost) return
450450

451-
// stop looping as soon as we stop adding media
452451
val extracted = extractMedia(mediaHolder, cost = cost)
453-
if (extracted <= 1) return // the Inexhaustible Phial thinks it's funny.
454-
455452
media += extracted
453+
454+
// stop looping as soon as we stop adding media
455+
if (extracted <= 1) return // the Inexhaustible Phial thinks it's funny.
456456
}
457457
}
458458

0 commit comments

Comments
 (0)