| 
23 | 23 | import net.minecraft.world.level.block.*;  | 
24 | 24 | import net.minecraft.world.level.block.entity.BlockEntity;  | 
25 | 25 | import net.minecraft.world.level.block.state.BlockState;  | 
26 |  | -import net.minecraft.world.level.block.state.properties.BedPart;  | 
27 |  | -import net.minecraft.world.level.block.state.properties.BlockStateProperties;  | 
28 |  | -import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;  | 
29 |  | -import net.minecraft.world.level.block.state.properties.DripstoneThickness;  | 
 | 26 | +import net.minecraft.world.level.block.state.properties.*;  | 
30 | 27 | import net.minecraft.world.phys.AABB;  | 
31 | 28 | import org.jetbrains.annotations.Nullable;  | 
32 | 29 | 
 
  | 
@@ -341,9 +338,11 @@ public List<ItemStack> getRequiredItems(  | 
341 | 338 |           @Nullable final CompoundTag tileEntityData,  | 
342 | 339 |           final boolean complete)  | 
343 | 340 |         {  | 
344 |  | -            final List<ItemStack> itemList = new ArrayList<>();  | 
345 |  | -            itemList.add(new ItemStack(Blocks.DIRT));  | 
346 |  | -            return itemList;  | 
 | 341 | +            if (complete)  | 
 | 342 | +            {  | 
 | 343 | +                return Collections.singletonList(new ItemStack(blockState.getBlock()));  | 
 | 344 | +            }  | 
 | 345 | +            return Collections.singletonList(new ItemStack(Blocks.DIRT));  | 
347 | 346 |         }  | 
348 | 347 |     }  | 
349 | 348 | 
 
  | 
@@ -647,9 +646,11 @@ public List<ItemStack> getRequiredItems(  | 
647 | 646 |           @Nullable final CompoundTag tileEntityData,  | 
648 | 647 |           final boolean complete)  | 
649 | 648 |         {  | 
650 |  | -            final List<ItemStack> itemList = new ArrayList<>();  | 
651 |  | -            itemList.add(new ItemStack(Blocks.DIRT, 1));  | 
652 |  | -            return itemList;  | 
 | 649 | +            if (complete)  | 
 | 650 | +            {  | 
 | 651 | +                return Collections.singletonList(new ItemStack(blockState.getBlock()));  | 
 | 652 | +            }  | 
 | 653 | +            return Collections.singletonList(new ItemStack(Blocks.DIRT));  | 
653 | 654 |         }  | 
654 | 655 |     }  | 
655 | 656 | 
 
  | 
@@ -686,6 +687,10 @@ public List<ItemStack> getRequiredItems(  | 
686 | 687 |           @Nullable final CompoundTag tileEntityData,  | 
687 | 688 |           final boolean complete)  | 
688 | 689 |         {  | 
 | 690 | +            if (complete)  | 
 | 691 | +            {  | 
 | 692 | +                return Collections.singletonList(new ItemStack(blockState.getBlock()));  | 
 | 693 | +            }  | 
689 | 694 |             return new ArrayList<>();  | 
690 | 695 |         }  | 
691 | 696 |     }  | 
 | 
0 commit comments