|
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 |
|
@@ -342,9 +339,11 @@ public List<ItemStack> getRequiredItems(
|
342 | 339 | @Nullable final CompoundTag tileEntityData,
|
343 | 340 | final boolean complete)
|
344 | 341 | {
|
345 |
| - final List<ItemStack> itemList = new ArrayList<>(); |
346 |
| - itemList.add(new ItemStack(Blocks.DIRT)); |
347 |
| - return itemList; |
| 342 | + if (complete) |
| 343 | + { |
| 344 | + return Collections.singletonList(new ItemStack(blockState.getBlock())); |
| 345 | + } |
| 346 | + return Collections.singletonList(new ItemStack(Blocks.DIRT)); |
348 | 347 | }
|
349 | 348 | }
|
350 | 349 |
|
@@ -648,9 +647,11 @@ public List<ItemStack> getRequiredItems(
|
648 | 647 | @Nullable final CompoundTag tileEntityData,
|
649 | 648 | final boolean complete)
|
650 | 649 | {
|
651 |
| - final List<ItemStack> itemList = new ArrayList<>(); |
652 |
| - itemList.add(new ItemStack(Blocks.DIRT, 1)); |
653 |
| - return itemList; |
| 650 | + if (complete) |
| 651 | + { |
| 652 | + return Collections.singletonList(new ItemStack(blockState.getBlock())); |
| 653 | + } |
| 654 | + return Collections.singletonList(new ItemStack(Blocks.DIRT)); |
654 | 655 | }
|
655 | 656 | }
|
656 | 657 |
|
@@ -687,6 +688,10 @@ public List<ItemStack> getRequiredItems(
|
687 | 688 | @Nullable final CompoundTag tileEntityData,
|
688 | 689 | final boolean complete)
|
689 | 690 | {
|
| 691 | + if (complete) |
| 692 | + { |
| 693 | + return Collections.singletonList(new ItemStack(blockState.getBlock())); |
| 694 | + } |
690 | 695 | return new ArrayList<>();
|
691 | 696 | }
|
692 | 697 | }
|
|
0 commit comments