|
6 | 6 | import java.util.stream.Collectors;
|
7 | 7 | import java.util.stream.Stream;
|
8 | 8 |
|
| 9 | +import com.simibubi.create.foundation.data.recipe.Mods; |
9 | 10 | import com.simibubi.create.foundation.utility.NBTProcessors;
|
10 | 11 |
|
| 12 | +import net.minecraft.core.Registry; |
11 | 13 | import net.minecraft.world.entity.Entity;
|
12 | 14 | import net.minecraft.world.entity.decoration.ArmorStand;
|
13 | 15 | import net.minecraft.world.entity.decoration.ItemFrame;
|
@@ -94,10 +96,19 @@ private static ItemRequirement defaultOf(BlockState state, BlockEntity be) {
|
94 | 96 | if (block instanceof SnowLayerBlock)
|
95 | 97 | return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(item, state.getValue(SnowLayerBlock.LAYERS)
|
96 | 98 | .intValue()));
|
| 99 | + // FD's rich soil extends FarmBlock so this is to make sure the cost is correct (it should be rich soil not dirt) |
| 100 | + if (block == Registry.BLOCK.get(Mods.FD.asResource("rich_soil_farmland"))) |
| 101 | + return new ItemRequirement(ItemUseType.CONSUME, Registry.ITEM.get(Mods.FD.asResource("rich_soil"))); |
97 | 102 | if (block instanceof FarmBlock || block instanceof DirtPathBlock)
|
98 | 103 | return new ItemRequirement(ItemUseType.CONSUME, Items.DIRT);
|
99 | 104 | if (block instanceof AbstractBannerBlock && be instanceof BannerBlockEntity bannerBE)
|
100 | 105 | return new ItemRequirement(new StrictNbtStackRequirement(bannerBE.getItem(), ItemUseType.CONSUME));
|
| 106 | + // Tall grass doesnt exist as a block so use 2 grass blades |
| 107 | + if (block == Blocks.TALL_GRASS) |
| 108 | + return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(Items.GRASS, 2)); |
| 109 | + // Large ferns don't exist as blocks so use 2 ferns instead |
| 110 | + if (block == Blocks.LARGE_FERN) |
| 111 | + return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(Items.FERN, 2)); |
101 | 112 |
|
102 | 113 | return new ItemRequirement(ItemUseType.CONSUME, item);
|
103 | 114 | }
|
|
0 commit comments