aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-09-11 00:09:29 +0800
committershedaniel <daniel@shedaniel.me>2020-09-11 00:09:29 +0800
commitb76420e3bd81886593587c295284b33e57b29cdf (patch)
tree7fb384f50d8a0ffdea5c2ddc2b5b01c54ce40f2e
parent87825fc51483fc0f735e5e4e3a435c2862e0495a (diff)
downloadRoughlyEnoughItems-b76420e3bd81886593587c295284b33e57b29cdf.tar.gz
RoughlyEnoughItems-b76420e3bd81886593587c295284b33e57b29cdf.tar.bz2
RoughlyEnoughItems-b76420e3bd81886593587c295284b33e57b29cdf.zip
1.16.3 and remove the assumption that fabric tags are categorizing the tools.
Signed-off-by: shedaniel <daniel@shedaniel.me>
-rw-r--r--RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java34
-rwxr-xr-xbuild.gradle1
-rw-r--r--gradle.properties7
3 files changed, 27 insertions, 15 deletions
diff --git a/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java b/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
index c5198bce1..793052a28 100644
--- a/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
+++ b/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
@@ -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);
diff --git a/build.gradle b/build.gradle
index c605ab16b..204bcd54f 100755
--- a/build.gradle
+++ b/build.gradle
@@ -284,6 +284,7 @@ curseforge {
changelog = releaseChangelog
addGameVersion "1.16-Snapshot"
addGameVersion "1.16.2"
+ addGameVersion "1.16.3"
addGameVersion "Java 8"
addGameVersion "Fabric"
relations {
diff --git a/gradle.properties b/gradle.properties
index 65f2199d0..6f601b200 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,8 +1,7 @@
org.gradle.jvmargs=-Xmx3G
-mod_version=5.4.1
-supported_version=1.16.2
-minecraft_version=1.16.2-rc1
-yarn_version=1.16.2-rc1+build.4+legacy.20w09a+build.8
+mod_version=5.4.2
+supported_version=1.16.2/3
+minecraft_version=1.16.3
fabricloader_version=0.9.1+build.205
cloth_client_events_v0_version=1.4.5
cloth_config_version=4.8.1