diff --git a/.gitignore b/.gitignore index 09cd281..99d77b1 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,11 @@ bin/ # fabric run/ +remappedSrc/ + +# java + +hs_err_*.log +replay_*.log +*.hprof +*.jfr diff --git a/gradle.properties b/gradle.properties index e0a552b..34d020b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,16 @@ org.gradle.jvmargs = -Xmx1G # Fabric properties -minecraft_version = 1.19 -yarn_mappings = 1.19+build.4 -loader_version = 0.14.10 -fabric_version= 0.57.0+1.19 +minecraft_version = 1.19.3 +yarn_mappings = 1.19.3+build.2 +loader_version = 0.14.11 +fabric_version= 0.68.1+1.19.3 # Mod properties -mod_version = 1.4.0 +mod_version = 1.5.0 maven_group = me.heyzeer0 archives_base_name = ShieldDisruptor # Other -modmenu_version = 4.0.0 -clothconfig_version = 7.0.72 \ No newline at end of file +modmenu_version = 5.0.1 +clothconfig_version = 9.0.94 \ No newline at end of file diff --git a/src/main/java/net/heyzeer0/sd/configs/GeneralConfig.java b/src/main/java/net/heyzeer0/sd/configs/GeneralConfig.java index 905ae11..cae0cbc 100644 --- a/src/main/java/net/heyzeer0/sd/configs/GeneralConfig.java +++ b/src/main/java/net/heyzeer0/sd/configs/GeneralConfig.java @@ -3,7 +3,7 @@ import me.shedaniel.autoconfig.ConfigData; import me.shedaniel.autoconfig.annotation.Config; import net.minecraft.item.Items; -import net.minecraft.util.registry.Registry; +import net.minecraft.registry.Registries; import java.util.Arrays; import java.util.List; @@ -14,8 +14,8 @@ public class GeneralConfig implements ConfigData { public boolean isEnabled = true; public List hiddenItems = Arrays.asList( - Registry.ITEM.getId(Items.SHIELD).toString(), - Registry.ITEM.getId(Items.TOTEM_OF_UNDYING).toString()); + Registries.ITEM.getId(Items.SHIELD).toString(), + Registries.ITEM.getId(Items.TOTEM_OF_UNDYING).toString()); // Ignore case and leading/trailing whitespaces when checking if entry is in config public boolean contains(String s) { diff --git a/src/main/java/net/heyzeer0/sd/mixins/MixinHeldItemRenderer.java b/src/main/java/net/heyzeer0/sd/mixins/MixinHeldItemRenderer.java index c311ce1..8345ed4 100644 --- a/src/main/java/net/heyzeer0/sd/mixins/MixinHeldItemRenderer.java +++ b/src/main/java/net/heyzeer0/sd/mixins/MixinHeldItemRenderer.java @@ -10,12 +10,10 @@ import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; -import net.minecraft.tag.ItemTags; -import net.minecraft.tag.TagBuilder; -import net.minecraft.tag.TagEntry; -import net.minecraft.tag.TagKey; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -37,7 +35,7 @@ private void hideShield(LivingEntity entity, ItemStack stack, ModelTransformatio if (player != null && player.getOffHandStack() != stack) return; GeneralConfig config = ModCore.getMain().getGeneralConfig(); - String id = Registry.ITEM.getId(stack.getItem()).toString(); + String id = Registries.ITEM.getId(stack.getItem()).toString(); // Check if the item is specified in config if(config.contains(id) || (id.startsWith("minecraft:") && config.contains(id.substring(10)))) { @@ -53,7 +51,7 @@ private void hideShield(LivingEntity entity, ItemStack stack, ModelTransformatio } TagKey t = TagKey.of( - Registry.ITEM_KEY, + RegistryKeys.ITEM, new Identifier( tagKey.split(":")[0].replaceFirst("#", ""), tagKey.split(":")[1])); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index ea6b3f0..a797ffc 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,8 +29,8 @@ ], "depends": { "fabricloader": ">=0.7.4", - "fabric": "*", - "minecraft": ">=1.16.5", + "fabric-api": "*", + "minecraft": ">=1.19.3", "cloth-config2": "*" }, "recommends": {