Selaa lähdekoodia

Tilling and Pathing (#403)

Signed-off-by: shedaniel <daniel@shedaniel.me>
Shnupbups 4 vuotta sitten
vanhempi
sitoutus
13b9c667bd

+ 2 - 0
RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/BuiltinPlugin.java

@@ -47,6 +47,8 @@ public interface BuiltinPlugin {
     Identifier FUEL = new Identifier("minecraft", "plugins/fuel");
     Identifier SMITHING = new Identifier("minecraft", "plugins/smithing");
     Identifier BEACON = new Identifier("minecraft", "plugins/beacon");
+    Identifier TILLING = new Identifier("minecraft", "plugins/tilling");
+    Identifier PATHING = new Identifier("minecraft", "plugins/pathing");
     Identifier INFO = new Identifier("roughlyenoughitems", "plugins/information");
     
     static BuiltinPlugin getInstance() {

+ 28 - 1
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java

@@ -50,6 +50,9 @@ import me.shedaniel.rei.plugin.fuel.DefaultFuelCategory;
 import me.shedaniel.rei.plugin.fuel.DefaultFuelDisplay;
 import me.shedaniel.rei.plugin.information.DefaultInformationCategory;
 import me.shedaniel.rei.plugin.information.DefaultInformationDisplay;
+import me.shedaniel.rei.plugin.pathing.DefaultPathingCategory;
+import me.shedaniel.rei.plugin.pathing.DefaultPathingDisplay;
+import me.shedaniel.rei.plugin.pathing.DummyShovelItem;
 import me.shedaniel.rei.plugin.smelting.DefaultSmeltingDisplay;
 import me.shedaniel.rei.plugin.smithing.DefaultSmithingCategory;
 import me.shedaniel.rei.plugin.smithing.DefaultSmithingDisplay;
@@ -59,6 +62,9 @@ import me.shedaniel.rei.plugin.stonecutting.DefaultStoneCuttingDisplay;
 import me.shedaniel.rei.plugin.stripping.DefaultStrippingCategory;
 import me.shedaniel.rei.plugin.stripping.DefaultStrippingDisplay;
 import me.shedaniel.rei.plugin.stripping.DummyAxeItem;
+import me.shedaniel.rei.plugin.tilling.DefaultTillingCategory;
+import me.shedaniel.rei.plugin.tilling.DefaultTillingDisplay;
+import me.shedaniel.rei.plugin.tilling.DummyHoeItem;
 import me.shedaniel.rei.utils.CollectionUtils;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.Environment;
@@ -86,7 +92,6 @@ import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.*;
-import java.util.function.Consumer;
 import java.util.function.UnaryOperator;
 
 import static me.shedaniel.rei.impl.Internals.attachInstance;
@@ -107,6 +112,8 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin {
     public static final Identifier FUEL = BuiltinPlugin.FUEL;
     public static final Identifier SMITHING = BuiltinPlugin.SMITHING;
     public static final Identifier BEACON = BuiltinPlugin.BEACON;
+    public static final Identifier TILLING = BuiltinPlugin.TILLING;
+    public static final Identifier PATHING = BuiltinPlugin.PATHING;
     public static final Identifier INFO = BuiltinPlugin.INFO;
     private static final Identifier DISPLAY_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/display.png");
     private static final Identifier DISPLAY_TEXTURE_DARK = new Identifier("roughlyenoughitems", "textures/gui/display_dark.png");
@@ -202,6 +209,8 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin {
                 new DefaultStrippingCategory(),
                 new DefaultSmithingCategory(),
                 new DefaultBeaconBaseCategory(),
+                new DefaultTillingCategory(),
+                new DefaultPathingCategory(),
                 new DefaultInformationCategory()
         );
     }
@@ -255,6 +264,12 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin {
         DummyAxeItem.getStrippedBlocksMap().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getId(b.getKey()))).forEach(set -> {
             recipeHelper.registerDisplay(new DefaultStrippingDisplay(EntryStack.create(set.getKey()), EntryStack.create(set.getValue())));
         });
+        DummyHoeItem.getTilledBlocksMap().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getId(b.getKey()))).forEach(set -> {
+            recipeHelper.registerDisplay(new DefaultTillingDisplay(EntryStack.create(set.getKey()), EntryStack.create(set.getValue().getBlock())));
+        });
+        DummyShovelItem.getPathBlocksMap().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getId(b.getKey()))).forEach(set -> {
+            recipeHelper.registerDisplay(new DefaultPathingDisplay(EntryStack.create(set.getKey()), EntryStack.create(set.getValue().getBlock())));
+        });
         recipeHelper.registerDisplay(new DefaultBeaconBaseDisplay(CollectionUtils.map(Lists.newArrayList(BlockTags.BEACON_BASE_BLOCKS.values()), ItemStack::new)));
     }
     
@@ -324,6 +339,18 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin {
                 recipeHelper.registerWorkingStations(STRIPPING, EntryStack.create(item));
             }
         }
+        Tag<Item> hoes = MinecraftClient.getInstance().getNetworkHandler().getTagManager().getItems().getTag(new Identifier("fabric", "hoes"));
+        if (hoes != null) {
+            for (Item item : hoes.values()) {
+                recipeHelper.registerWorkingStations(TILLING, EntryStack.create(item));
+            }
+        }
+        Tag<Item> shovels = MinecraftClient.getInstance().getNetworkHandler().getTagManager().getItems().getTag(new Identifier("fabric", "shovels"));
+        if (shovels != null) {
+            for (Item item : shovels.values()) {
+                recipeHelper.registerWorkingStations(PATHING, EntryStack.create(item));
+            }
+        }
         recipeHelper.removeAutoCraftButton(FUEL);
         recipeHelper.removeAutoCraftButton(COMPOSTING);
         recipeHelper.removeAutoCraftButton(BEACON);

+ 75 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/pathing/DefaultPathingCategory.java

@@ -0,0 +1,75 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.pathing;
+
+import net.minecraft.client.resource.language.I18n;
+import net.minecraft.item.Items;
+import net.minecraft.util.Identifier;
+
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.EntryStack;
+import me.shedaniel.rei.api.RecipeCategory;
+import me.shedaniel.rei.api.widgets.Widgets;
+import me.shedaniel.rei.gui.widget.Widget;
+import me.shedaniel.rei.plugin.DefaultPlugin;
+
+import com.google.common.collect.Lists;
+import java.util.List;
+
+public class DefaultPathingCategory implements RecipeCategory<DefaultPathingDisplay> {
+    
+    @Override
+    public Identifier getIdentifier() {
+        return DefaultPlugin.PATHING;
+    }
+    
+    @Override
+    public EntryStack getLogo() {
+        return EntryStack.create(Items.IRON_SHOVEL);
+    }
+    
+    @Override
+    public String getCategoryName() {
+        return I18n.translate("category.rei.pathing");
+    }
+    
+    @Override
+    public List<Widget> setupDisplay(DefaultPathingDisplay recipeDisplay, Rectangle bounds) {
+        Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+        List<Widget> widgets = Lists.newArrayList();
+        widgets.add(Widgets.createRecipeBase(bounds));
+        widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+        widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+        widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entry(recipeDisplay.getIn()).markInput());
+        widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entry(recipeDisplay.getOut()).disableBackground().markInput());
+        return widgets;
+    }
+    
+    @Override
+    public int getDisplayHeight() {
+        return 36;
+    }
+    
+}

+ 80 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/pathing/DefaultPathingDisplay.java

@@ -0,0 +1,80 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.pathing;
+
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Identifier;
+
+import me.shedaniel.rei.api.EntryStack;
+import me.shedaniel.rei.api.RecipeDisplay;
+import me.shedaniel.rei.plugin.DefaultPlugin;
+
+import java.util.Collections;
+import java.util.List;
+
+@Environment(EnvType.CLIENT)
+public class DefaultPathingDisplay implements RecipeDisplay {
+    private EntryStack in, out;
+    
+    public DefaultPathingDisplay(EntryStack in, EntryStack out) {
+        this.in = in;
+        this.out = out;
+    }
+    
+    public DefaultPathingDisplay(ItemStack in, ItemStack out) {
+        this.in = EntryStack.create(in);
+        this.out = EntryStack.create(out);
+    }
+    
+    public final EntryStack getIn() {
+        return in;
+    }
+    
+    public final EntryStack getOut() {
+        return out;
+    }
+    
+    @Override
+    public List<List<EntryStack>> getInputEntries() {
+        return Collections.singletonList(Collections.singletonList(in));
+    }
+    
+    @Override
+    public List<List<EntryStack>> getResultingEntries() {
+        return Collections.singletonList(Collections.singletonList(out));
+    }
+    
+    @Override
+    public Identifier getRecipeCategory() {
+        return DefaultPlugin.PATHING;
+    }
+    
+    @Override
+    public List<List<EntryStack>> getRequiredEntries() {
+        return getInputEntries();
+    }
+}

+ 42 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/pathing/DummyShovelItem.java

@@ -0,0 +1,42 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.pathing;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockState;
+import net.minecraft.item.HoeItem;
+import net.minecraft.item.ShovelItem;
+import net.minecraft.item.ToolMaterial;
+
+import java.util.Map;
+
+public class DummyShovelItem extends ShovelItem {
+    protected DummyShovelItem(ToolMaterial toolMaterial_1, float float_1, float float_2, Settings item$Settings_1) {
+        super(toolMaterial_1, float_1, float_2, item$Settings_1);
+    }
+    
+    public static Map<Block, BlockState> getPathBlocksMap() {
+        return PATH_BLOCKSTATES;
+    }
+}

+ 75 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/tilling/DefaultTillingCategory.java

@@ -0,0 +1,75 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.tilling;
+
+import net.minecraft.client.resource.language.I18n;
+import net.minecraft.item.Items;
+import net.minecraft.util.Identifier;
+
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.EntryStack;
+import me.shedaniel.rei.api.RecipeCategory;
+import me.shedaniel.rei.api.widgets.Widgets;
+import me.shedaniel.rei.gui.widget.Widget;
+import me.shedaniel.rei.plugin.DefaultPlugin;
+
+import com.google.common.collect.Lists;
+import java.util.List;
+
+public class DefaultTillingCategory implements RecipeCategory<DefaultTillingDisplay> {
+    
+    @Override
+    public Identifier getIdentifier() {
+        return DefaultPlugin.TILLING;
+    }
+    
+    @Override
+    public EntryStack getLogo() {
+        return EntryStack.create(Items.IRON_HOE);
+    }
+    
+    @Override
+    public String getCategoryName() {
+        return I18n.translate("category.rei.tilling");
+    }
+    
+    @Override
+    public List<Widget> setupDisplay(DefaultTillingDisplay recipeDisplay, Rectangle bounds) {
+        Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+        List<Widget> widgets = Lists.newArrayList();
+        widgets.add(Widgets.createRecipeBase(bounds));
+        widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+        widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+        widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entry(recipeDisplay.getIn()).markInput());
+        widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entry(recipeDisplay.getOut()).disableBackground().markInput());
+        return widgets;
+    }
+    
+    @Override
+    public int getDisplayHeight() {
+        return 36;
+    }
+    
+}

+ 80 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/tilling/DefaultTillingDisplay.java

@@ -0,0 +1,80 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.tilling;
+
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Identifier;
+
+import me.shedaniel.rei.api.EntryStack;
+import me.shedaniel.rei.api.RecipeDisplay;
+import me.shedaniel.rei.plugin.DefaultPlugin;
+
+import java.util.Collections;
+import java.util.List;
+
+@Environment(EnvType.CLIENT)
+public class DefaultTillingDisplay implements RecipeDisplay {
+    private EntryStack in, out;
+    
+    public DefaultTillingDisplay(EntryStack in, EntryStack out) {
+        this.in = in;
+        this.out = out;
+    }
+    
+    public DefaultTillingDisplay(ItemStack in, ItemStack out) {
+        this.in = EntryStack.create(in);
+        this.out = EntryStack.create(out);
+    }
+    
+    public final EntryStack getIn() {
+        return in;
+    }
+    
+    public final EntryStack getOut() {
+        return out;
+    }
+    
+    @Override
+    public List<List<EntryStack>> getInputEntries() {
+        return Collections.singletonList(Collections.singletonList(in));
+    }
+    
+    @Override
+    public List<List<EntryStack>> getResultingEntries() {
+        return Collections.singletonList(Collections.singletonList(out));
+    }
+    
+    @Override
+    public Identifier getRecipeCategory() {
+        return DefaultPlugin.TILLING;
+    }
+    
+    @Override
+    public List<List<EntryStack>> getRequiredEntries() {
+        return getInputEntries();
+    }
+}

+ 41 - 0
RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/tilling/DummyHoeItem.java

@@ -0,0 +1,41 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.tilling;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockState;
+import net.minecraft.item.HoeItem;
+import net.minecraft.item.ToolMaterial;
+
+import java.util.Map;
+
+public class DummyHoeItem extends HoeItem {
+    protected DummyHoeItem(ToolMaterial toolMaterial_1, int int_1, float float_1, Settings item$Settings_1) {
+        super(toolMaterial_1, int_1, float_1, item$Settings_1);
+    }
+    
+    public static Map<Block, BlockState> getTilledBlocksMap() {
+        return TILLED_BLOCKS;
+    }
+}

+ 2 - 0
src/main/resources/assets/roughlyenoughitems/lang/en_us.json

@@ -31,6 +31,8 @@
   "category.rei.stripping": "Stripping",
   "category.rei.smithing": "Smithing",
   "category.rei.beacon_base": "Beacon Base",
+  "category.rei.tilling": "Tilling",
+  "category.rei.pathing": "Pathing",
   "category.rei.information": "Information",
   "text.rei.composting.chance": "§e%d%% Chance",
   "text.rei.composting.page": "Page %d",