|
19 | 19 | import com.simibubi.create.content.contraptions.render.ContraptionMatrices; |
20 | 20 | import com.simibubi.create.content.contraptions.render.ContraptionRenderDispatcher; |
21 | 21 | import com.simibubi.create.content.kinetics.base.BlockBreakingMovementBehaviour; |
22 | | -import com.simibubi.create.content.logistics.filter.FilterItem; |
| 22 | +import com.simibubi.create.content.logistics.filter.FilterItemStack; |
23 | 23 | import com.simibubi.create.content.trains.bogey.StandardBogeyBlock; |
24 | 24 | import com.simibubi.create.content.trains.entity.Carriage; |
25 | 25 | import com.simibubi.create.content.trains.entity.CarriageBogey; |
@@ -193,10 +193,10 @@ protected List<BlockPos> getPositionsToBreak(MovementContext context, BlockPos v |
193 | 193 |
|
194 | 194 | int startingY = 1; |
195 | 195 | if (!getStateToPaveWith(context).isAir()) { |
196 | | - ItemStack filter = ItemStack.of(context.blockEntityData.getCompound("Filter")); |
197 | | - if (!ItemHelper |
| 196 | + FilterItemStack filter = context.getFilterFromBE(); |
| 197 | + if (!ItemHelper |
198 | 198 | .extract(context.contraption.getSharedInventory(), |
199 | | - stack -> FilterItem.test(context.world, stack, filter), 1, true) |
| 199 | + stack -> filter.test(context.world, stack), 1, true) |
200 | 200 | .isEmpty()) |
201 | 201 | startingY = 0; |
202 | 202 | } |
@@ -473,9 +473,9 @@ protected PaveResult tryFill(MovementContext context, BlockPos targetPos, BlockS |
473 | 473 | .isEmpty()) |
474 | 474 | return PaveResult.FAIL; |
475 | 475 |
|
476 | | - ItemStack filter = ItemStack.of(context.blockEntityData.getCompound("Filter")); |
| 476 | + FilterItemStack filter = context.getFilterFromBE(); |
477 | 477 | ItemStack held = ItemHelper.extract(context.contraption.getSharedInventory(), |
478 | | - stack -> FilterItem.test(context.world, stack, filter), 1, false); |
| 478 | + stack -> filter.test(context.world, stack), 1, false); |
479 | 479 | if (held.isEmpty()) |
480 | 480 | return PaveResult.FAIL; |
481 | 481 |
|
|
0 commit comments