|
@@ -359,23 +359,35 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin {
|
|
|
recipeHelper.registerWorkingStations(SMITHING, EntryStack.create(Items.SMITHING_TABLE));
|
|
|
recipeHelper.registerWorkingStations(BEACON, EntryStack.create(Items.BEACON));
|
|
|
recipeHelper.registerWorkingStations(BEACON_PAYMENT, EntryStack.create(Items.BEACON));
|
|
|
- Tag<Item> axes = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("fabric", "axes"));
|
|
|
- if (axes != null) {
|
|
|
- for (Item item : axes.getValues()) {
|
|
|
+ Set<Item> axes = Sets.newHashSet(), hoes = Sets.newHashSet(), shovels = Sets.newHashSet();
|
|
|
+ EntryRegistry.getInstance().getEntryStacks().filter(stack -> stack.getType() == EntryStack.Type.ITEM).map(EntryStack::getItem).forEach(item -> {
|
|
|
+ if (item instanceof AxeItem && axes.add(item)) {
|
|
|
recipeHelper.registerWorkingStations(STRIPPING, EntryStack.create(item));
|
|
|
}
|
|
|
- }
|
|
|
- Tag<Item> hoes = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("fabric", "hoes"));
|
|
|
- if (hoes != null) {
|
|
|
- for (Item item : hoes.getValues()) {
|
|
|
+ if (item instanceof HoeItem && hoes.add(item)) {
|
|
|
recipeHelper.registerWorkingStations(TILLING, EntryStack.create(item));
|
|
|
}
|
|
|
- }
|
|
|
- Tag<Item> shovels = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("fabric", "shovels"));
|
|
|
- if (shovels != null) {
|
|
|
- for (Item item : shovels.getValues()) {
|
|
|
+ if (item instanceof ShovelItem && shovels.add(item)) {
|
|
|
recipeHelper.registerWorkingStations(PATHING, EntryStack.create(item));
|
|
|
}
|
|
|
+ });
|
|
|
+ Tag<Item> axesTag = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("c", "axes"));
|
|
|
+ if (axesTag != null) {
|
|
|
+ for (Item item : axesTag.getValues()) {
|
|
|
+ if (axes.add(item)) recipeHelper.registerWorkingStations(STRIPPING, EntryStack.create(item));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Tag<Item> hoesTag = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("c", "hoes"));
|
|
|
+ if (hoesTag != null) {
|
|
|
+ for (Item item : hoesTag.getValues()) {
|
|
|
+ if (hoes.add(item)) recipeHelper.registerWorkingStations(TILLING, EntryStack.create(item));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Tag<Item> shovelsTag = Minecraft.getInstance().getConnection().getTags().getItems().getTag(new ResourceLocation("c", "shovels"));
|
|
|
+ if (shovelsTag != null) {
|
|
|
+ for (Item item : shovelsTag.getValues()) {
|
|
|
+ if (shovels.add(item)) recipeHelper.registerWorkingStations(PATHING, EntryStack.create(item));
|
|
|
+ }
|
|
|
}
|
|
|
recipeHelper.removeAutoCraftButton(FUEL);
|
|
|
recipeHelper.removeAutoCraftButton(COMPOSTING);
|