@@ -38,50 +38,6 @@ public boolean hasPadding(IWorldReader world, MiniaturizationRecipe recipe) {
3838 return false ;
3939 }
4040
41- // @Override
42- // public boolean matchesFieldLayer(IWorldReader world, MiniaturizationRecipe recipe, FieldProjectionSize fieldSize, AxisAlignedBB fieldLayer) {
43- // Optional<BlockState> component = recipe.getRecipeComponent(componentKey);
44- // // We can't find a component definition in the recipe, so something very wrong happened
45- // if(!component.isPresent()) {
46- // CompactCrafting.LOGGER.warn(
47- // String.format("Attempted to find component with key '%s' but no component was found.", componentKey)
48- // );
49- //
50- // return false;
51- // }
52- //
53- // // Dimensions check - make sure the field layer is large enough for the recipe layer
54- // if(this.dimensions.getXSize() > fieldLayer.getXSize() || this.dimensions.getZSize() > fieldLayer.getZSize())
55- // return false;
56- //
57- // // Non-empty field positions
58- // BlockPos[] fieldPositions = BlockPos.getAllInBox(fieldLayer)
59- // .filter(p -> !world.isAirBlock(p))
60- // .map(BlockPos::toImmutable)
61- // .toArray(BlockPos[]::new);
62- //
63- // // Get all the distinct block types in the current layer
64- // Stream<BlockState> distinctStates = Arrays.stream(fieldPositions)
65- // .map(world::getBlockState)
66- // .distinct();
67- //
68- // // Invalid block found - early exit
69- // if(distinctStates.anyMatch(state -> state != component.get()))
70- // return false;
71- //
72- // BlockPos[] normalizedFilledPositions = RecipeHelper.normalizeLayerPositions(this.dimensions, fieldPositions);
73- //
74- // // Create a minimum-filled bounds of blocks in the field
75- // AxisAlignedBB trimmedBounds = BlockSpaceUtil.getBoundsForBlocks(Arrays.asList(normalizedFilledPositions));
76- //
77- // // Whitespace trim done - no padding needed, min and max bounds are already correct
78- //
79- // // Check recipe template against padded world layout
80- // Map<BlockPos, String> templateMap = RecipeHelper.remapLayerToRecipe(world, recipe, fieldSize, fieldLayer);
81- //
82- // return RecipeHelper.layerMatchesTemplate(world, recipe, this, fieldLayer, normalizedFilledPositions);
83- // }
84-
8541 @ Override
8642 public AxisAlignedBB getDimensions () {
8743 return dimensions ;
0 commit comments