diff --git a/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java b/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java index 6220d871c..1d8602b6c 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java +++ b/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java @@ -4,22 +4,14 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.SeaPickleBlock; -import net.minecraft.block.SnowBlock; -import net.minecraft.block.TurtleEggBlock; +import net.minecraft.block.*; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.item.BoatEntity; import net.minecraft.entity.item.ItemFrameEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; +import net.minecraft.item.*; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.SlabType; @@ -65,6 +57,10 @@ public class ItemRequirement { return new ItemRequirement(ItemUseType.CONSUME, Arrays.asList(new ItemStack(item, state.get(SeaPickleBlock.PICKLES).intValue()))); if (block instanceof SnowBlock) return new ItemRequirement(ItemUseType.CONSUME, Arrays.asList(new ItemStack(item, state.get(SnowBlock.LAYERS).intValue()))); + if (block instanceof GrassPathBlock) + return new ItemRequirement(ItemUseType.CONSUME, Arrays.asList(new ItemStack(Items.GRASS_BLOCK))); + if (block instanceof FarmlandBlock) + return new ItemRequirement(ItemUseType.CONSUME, Arrays.asList(new ItemStack(Items.DIRT))); return item == Items.AIR ? INVALID : new ItemRequirement(ItemUseType.CONSUME, item); } diff --git a/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java b/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java index c851e0173..9c1abc718 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.utility; import java.util.function.Consumer; +import net.minecraft.item.Items; import org.apache.commons.lang3.mutable.MutableInt; import net.minecraft.block.Block; @@ -115,6 +116,10 @@ public class BlockHelper { public static ItemStack getRequiredItem(BlockState state) { ItemStack itemStack = new ItemStack(state.getBlock()); + if (itemStack.getItem() == Items.FARMLAND) + itemStack = new ItemStack(Items.DIRT); + else if (itemStack.getItem() == Items.GRASS_PATH) + itemStack = new ItemStack(Items.GRASS_BLOCK); return itemStack; }