diff --git a/src/main/java/net/rpgz/forge/Rpgz.java b/src/main/java/net/rpgz/forge/Rpgz.java index dec5230..830a0f7 100644 --- a/src/main/java/net/rpgz/forge/Rpgz.java +++ b/src/main/java/net/rpgz/forge/Rpgz.java @@ -6,6 +6,7 @@ import com.stereowalker.unionlib.api.collectors.ConfigCollector; import com.stereowalker.unionlib.mod.MinecraftMod; import com.stereowalker.unionlib.mod.ServerSegment; +import com.stereowalker.unionlib.util.VersionHelper; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.MinecraftForge; @@ -75,6 +76,6 @@ private void clientSetup(final FMLClientSetupEvent event) { public static ResourceLocation locationz(String name) { - return new ResourceLocation(MOD_ID, name); + return VersionHelper.toLoc(MOD_ID, name); } } diff --git a/src/main/java/net/rpgz/init/SoundInit.java b/src/main/java/net/rpgz/init/SoundInit.java index ae3d355..8bd1839 100644 --- a/src/main/java/net/rpgz/init/SoundInit.java +++ b/src/main/java/net/rpgz/init/SoundInit.java @@ -1,13 +1,15 @@ package net.rpgz.init; +import com.stereowalker.unionlib.util.VersionHelper; + import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvent; import net.minecraftforge.registries.RegisterEvent.RegisterHelper; public class SoundInit { - public static final ResourceLocation LOOT_SOUND = new ResourceLocation("rpgz:loot"); - public static final ResourceLocation COIN_LOOT_SOUND = new ResourceLocation("rpgz:coin_loot"); + public static final ResourceLocation LOOT_SOUND = VersionHelper.toLoc("rpgz:loot"); + public static final ResourceLocation COIN_LOOT_SOUND = VersionHelper.toLoc("rpgz:coin_loot"); public static SoundEvent LOOT_SOUND_EVENT = SoundEvent.createVariableRangeEvent(LOOT_SOUND); public static SoundEvent COIN_LOOT_SOUND_EVENT = SoundEvent.createVariableRangeEvent(COIN_LOOT_SOUND); diff --git a/src/main/java/net/rpgz/init/TagInit.java b/src/main/java/net/rpgz/init/TagInit.java index 7050759..bea00ab 100644 --- a/src/main/java/net/rpgz/init/TagInit.java +++ b/src/main/java/net/rpgz/init/TagInit.java @@ -1,5 +1,7 @@ package net.rpgz.init; +import com.stereowalker.unionlib.util.VersionHelper; + import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; @@ -8,8 +10,8 @@ public class TagInit { - public static final TagKey RARE_ITEMS = TagKey.create(Registries.ITEM, new ResourceLocation("rpgz", "rare_items")); - public static final TagKey> EXCLUDED_ENTITIES = TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation("rpgz", "excluded_entities")); + public static final TagKey RARE_ITEMS = TagKey.create(Registries.ITEM, VersionHelper.toLoc("rpgz", "rare_items")); + public static final TagKey> EXCLUDED_ENTITIES = TagKey.create(Registries.ENTITY_TYPE, VersionHelper.toLoc("rpgz", "excluded_entities")); public static void init() { } diff --git a/src/main/java/net/rpgz/mixin/InGameHudMixin.java b/src/main/java/net/rpgz/mixin/InGameHudMixin.java index 6ee1e3b..b3da38c 100644 --- a/src/main/java/net/rpgz/mixin/InGameHudMixin.java +++ b/src/main/java/net/rpgz/mixin/InGameHudMixin.java @@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import com.mojang.blaze3d.systems.RenderSystem; +import com.stereowalker.unionlib.util.VersionHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -36,7 +37,6 @@ public InGameHudMixin(Minecraft mc) { @Inject(method = "render", at = @At(value = "TAIL")) private void renderIngameGuiMixin(GuiGraphics pGuiGraphics, float f, CallbackInfo info) { this.renderLootBag(pGuiGraphics); - System.out.println("Graphics"); } private void renderLootBag(GuiGraphics guiComponent) { @@ -47,7 +47,7 @@ private void renderLootBag(GuiGraphics guiComponent) { if (deadBody != null && deadBody.deathTime > 20) { int scaledWidth = this.minecraft.getWindow().getGuiScaledWidth(); int scaledHeight = this.minecraft.getWindow().getGuiScaledHeight(); - guiComponent.blit(new ResourceLocation("rpgz:textures/sprite/loot_bag.png"), (scaledWidth / 2), (scaledHeight / 2) - 16, 0.0F, 0.0F, 16, 16, 16, + guiComponent.blit(VersionHelper.toLoc("rpgz:textures/sprite/loot_bag.png"), (scaledWidth / 2), (scaledHeight / 2) - 16, 0.0F, 0.0F, 16, 16, 16, 16); } }