diff --git a/gradle.properties b/gradle.properties index 8b1c9e3..af3c2ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2G # BTA -bta_version=1.7.7.0_02 +bta_version=1.7.7.1 # Loader loader_version=0.14.19-babric.1-bta diff --git a/src/main/java/turniplabs/halplibe/HalpLibe.java b/src/main/java/turniplabs/halplibe/HalpLibe.java index 248d73a..f991bbd 100644 --- a/src/main/java/turniplabs/halplibe/HalpLibe.java +++ b/src/main/java/turniplabs/halplibe/HalpLibe.java @@ -2,6 +2,8 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint; +import net.minecraft.core.Global; +import org.apache.commons.lang3.reflect.FieldUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import turniplabs.halplibe.helper.AchievementHelper; @@ -14,6 +16,9 @@ import turniplabs.halplibe.util.toml.Toml; import turniplabs.halplibe.util.version.PacketModList; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + public class HalpLibe implements ModInitializer, PreLaunchEntrypoint { public static final String MOD_ID = "halplibe"; public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); @@ -25,7 +30,6 @@ public class HalpLibe implements ModInitializer, PreLaunchEntrypoint { CONFIG = new TomlConfigHandler(MOD_ID, toml); - //Global.TEXTURE_ATLAS_WIDTH_TILES = Math.max(32, CONFIG.getInt("Experimental.AtlasWidth")); // Initialize Block and Item static fields try { Class.forName("net.minecraft.core.block.Block"); @@ -38,7 +42,6 @@ public class HalpLibe implements ModInitializer, PreLaunchEntrypoint { public static String addModId(String modId, String name) { return modId + "." + name; } - @Override public void onInitialize() { AchievementHelper.addPage(VANILLA_ACHIEVEMENTS); diff --git a/src/main/java/turniplabs/halplibe/helper/ArmorHelper.java b/src/main/java/turniplabs/halplibe/helper/ArmorHelper.java index 8c2a6f5..08fd9ce 100644 --- a/src/main/java/turniplabs/halplibe/helper/ArmorHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/ArmorHelper.java @@ -2,8 +2,6 @@ import net.minecraft.core.item.material.ArmorMaterial; import net.minecraft.core.util.helper.DamageType; -import org.apache.commons.lang3.ArrayUtils; -import turniplabs.halplibe.mixin.accessors.RenderPlayerAccessor; public class ArmorHelper { @@ -19,16 +17,12 @@ public class ArmorHelper { * @return the new ArmorMaterial. */ public static ArmorMaterial createArmorMaterial(String textureName, int durability, float combat, float blast, float fire, float fall) { - String[] armorFilenamePrefix = RenderPlayerAccessor.getArmorFilenamePrefix(); - armorFilenamePrefix = ArrayUtils.add(armorFilenamePrefix, textureName); - RenderPlayerAccessor.setArmorFilenamePrefix(armorFilenamePrefix); - - ArmorMaterial armorMaterial = new ArmorMaterial(textureName, armorFilenamePrefix.length - 1, durability); - armorMaterial.withProtectionPercentage(DamageType.COMBAT,combat); - armorMaterial.withProtectionPercentage(DamageType.COMBAT, combat); - armorMaterial.withProtectionPercentage(DamageType.BLAST, blast); - armorMaterial.withProtectionPercentage(DamageType.FIRE, fire); - armorMaterial.withProtectionPercentage(DamageType.FALL, fall); + ArmorMaterial armorMaterial = new ArmorMaterial(textureName, ArmorMaterial.getArmorMaterials().size()-1, durability) + .withProtectionPercentage(DamageType.COMBAT, combat) + .withProtectionPercentage(DamageType.BLAST, blast) + .withProtectionPercentage(DamageType.FIRE, fire) + .withProtectionPercentage(DamageType.FALL, fall); + ArmorMaterial.register(armorMaterial); return armorMaterial; } diff --git a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java index 28807c3..e2e86ed 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java @@ -22,6 +22,9 @@ public class BlockBuilder implements Cloneable { public static final Set infiniburnList = new TreeSet<>(); + static { + infiniburnList.add(Block.netherrack.id); + } private final String MOD_ID; private Float hardness = null; @@ -461,11 +464,11 @@ public Block build(Block block) { } if (luminance != null) { - ((BlockAccessor) block).callSetLightValue(luminance); + block.withLightEmission(luminance); } if (lightOpacity != null) { - ((BlockAccessor) block).callSetLightOpacity(lightOpacity); + block.withLightBlock(lightOpacity); } if (slipperiness != null) { @@ -490,7 +493,7 @@ public Block build(Block block) { ((BlockAccessor) block).callWithDisabledNeighborNotifyOnMetadataChange(); } - ((BlockAccessor) block).callSetTickOnLoad(tickOnLoad); + block.setTicking(tickOnLoad); if (blockDrop != null) { ((BlockAccessor) block).callSetDropOverride(blockDrop); diff --git a/src/main/java/turniplabs/halplibe/helper/BlockCoords.java b/src/main/java/turniplabs/halplibe/helper/BlockCoords.java index 74d96ac..04eb875 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockCoords.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockCoords.java @@ -17,7 +17,7 @@ public static int[] nextCoords() { lastX = 22; if (++lastY > Global.TEXTURE_ATLAS_WIDTH_TILES-1) { area = 1; - lastX = 7; + lastX = 10; lastY = 16; } } @@ -27,7 +27,7 @@ public static int[] nextCoords() { int x = lastX; int y = lastY; if (++lastX > 21) { - lastX = 7; + lastX = 10; if (++lastY > 30) { area = 2; lastX = 16; diff --git a/src/main/java/turniplabs/halplibe/helper/BlockHelper.java b/src/main/java/turniplabs/halplibe/helper/BlockHelper.java index 613a830..fd81ff6 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockHelper.java @@ -122,7 +122,7 @@ public static Block createBlock(String modId, Block block, BlockSound blockSound BlockSoundDispatcher.getInstance().addDispatch(block, blockSound); ((BlockAccessor) block).callSetHardness(hardness); ((BlockAccessor) block).callSetResistance(resistance); - ((BlockAccessor) block).callSetLightValue(lightValue); + block.withLightEmission(lightValue); Item.itemsList[block.id] = new ItemBlock(block); diff --git a/src/main/java/turniplabs/halplibe/helper/ParticleHelper.java b/src/main/java/turniplabs/halplibe/helper/ParticleHelper.java index 776b47c..5156953 100644 --- a/src/main/java/turniplabs/halplibe/helper/ParticleHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/ParticleHelper.java @@ -1,7 +1,8 @@ package turniplabs.halplibe.helper; -import net.minecraft.core.entity.fx.EntityFX; + +import net.minecraft.client.entity.fx.EntityFX; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/turniplabs/halplibe/helper/RecipeHelper.java b/src/main/java/turniplabs/halplibe/helper/RecipeHelper.java index 4b7eac2..b69fa25 100644 --- a/src/main/java/turniplabs/halplibe/helper/RecipeHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/RecipeHelper.java @@ -1,22 +1,17 @@ package turniplabs.halplibe.helper; import net.minecraft.core.block.Block; -import net.minecraft.core.crafting.CraftingManager; -import net.minecraft.core.crafting.recipe.*; +import net.minecraft.core.crafting.legacy.CraftingManager; +import net.minecraft.core.crafting.legacy.recipe.RecipesBlastFurnace; +import net.minecraft.core.crafting.legacy.recipe.RecipesFurnace; import net.minecraft.core.item.Item; import net.minecraft.core.item.ItemStack; -import turniplabs.halplibe.HalpLibe; -import turniplabs.halplibe.mixin.accessors.CraftingManagerAccessor; -import turniplabs.halplibe.mixin.accessors.RecipesBlastFurnaceAccessor; -import turniplabs.halplibe.mixin.accessors.RecipesFurnaceAccessor; - -import java.util.List; -import java.util.Map; - @Deprecated public class RecipeHelper { @Deprecated public static final CraftingManager craftingManager = CraftingManager.getInstance(); + public static final RecipesFurnace smeltingManager = RecipesFurnace.getInstance(); + public static final RecipesBlastFurnace blastingManager = RecipesBlastFurnace.getInstance(); @Deprecated public static final RecipesFurnace smeltingManager = RecipesFurnace.smelting(); @Deprecated @@ -24,123 +19,23 @@ public class RecipeHelper { @Deprecated public static void removeRecipe(Item outputItem, int meta) { - List recipes = craftingManager.getRecipeList(); - IRecipe theRecipe = null; - - for (IRecipe recipe : recipes) { - if (recipe instanceof RecipeShaped && ((RecipeShaped) recipe).recipeOutput.itemID == outputItem.id && ((RecipeShaped) recipe).recipeOutput.getMetadata() == meta) { - theRecipe = recipe; - break; - } else if (recipe instanceof RecipeShapeless && ((RecipeShapeless) recipe).recipeOutput.itemID == outputItem.id && ((RecipeShapeless) recipe).recipeOutput.getMetadata() == meta) { - theRecipe = recipe; - break; - } - } - - if (theRecipe == null) { - HalpLibe.LOGGER.debug("Couldn't find recipe with output: " + outputItem.getKey()); - return; - } - - recipes.remove(theRecipe); - ((CraftingManagerAccessor) craftingManager).setRecipes(recipes); - } - - @Deprecated - public static void removeRecipe(Block outputBlock, int meta) { - List recipes = craftingManager.getRecipeList(); IRecipe theRecipe = null; - for (IRecipe recipe : recipes) { - if (recipe instanceof RecipeShaped && ((RecipeShaped) recipe).recipeOutput.itemID == outputBlock.id && ((RecipeShaped) recipe).recipeOutput.getMetadata() == meta) { - theRecipe = recipe; - break; - } else if (recipe instanceof RecipeShapeless && ((RecipeShapeless) recipe).recipeOutput.itemID == outputBlock.id && ((RecipeShapeless) recipe).recipeOutput.getMetadata() == meta) { - theRecipe = recipe; - break; - } - } - - if (theRecipe == null) { - HalpLibe.LOGGER.debug("Couldn't find crafting recipe with output: " + outputBlock.getKey()); - return; - } - - recipes.remove(theRecipe); - ((CraftingManagerAccessor) craftingManager).setRecipes(recipes); - } - - @Deprecated - public static class Crafting { - - public static void createRecipe(Item outputItem, int amount, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddRecipe(new ItemStack(outputItem, amount), aobj); - } - - public static void createRecipe(Block outputBlock, int amount, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddRecipe(new ItemStack(outputBlock, amount), aobj); - } public static void createShapelessRecipe(Item outputItem, int amount, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddShapelessRecipe(new ItemStack(outputItem, amount), aobj); + craftingManager.addShapelessRecipe(new ItemStack(outputItem, amount), aobj); } public static void createShapelessRecipe(Block outputBlock, int amount, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddShapelessRecipe(new ItemStack(outputBlock, amount), aobj); + craftingManager.addShapelessRecipe(new ItemStack(outputBlock, amount), aobj); } public static void createRecipe(ItemStack stack, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddRecipe(stack, aobj); + craftingManager.addRecipe(stack, aobj); } public static void createShapelessRecipe(ItemStack stack, Object[] aobj) { - ((CraftingManagerAccessor) craftingManager).callAddShapelessRecipe(stack, aobj); - } - - public static void removeRecipe(Item outputItem) { - List recipes = craftingManager.getRecipeList(); - IRecipe theRecipe = null; - - for (IRecipe recipe : recipes) { - if (recipe instanceof RecipeShaped && ((RecipeShaped) recipe).recipeOutput.itemID == outputItem.id) { - theRecipe = recipe; - break; - } else if (recipe instanceof RecipeShapeless && ((RecipeShapeless) recipe).recipeOutput.itemID == outputItem.id) { - theRecipe = recipe; - break; - } - } - - if (theRecipe == null) { - HalpLibe.LOGGER.debug("Couldn't find recipe with output: " + outputItem.getKey()); - return; - } - - recipes.remove(theRecipe); - ((CraftingManagerAccessor) craftingManager).setRecipes(recipes); - } - - public static void removeRecipe(Block outputBlock) { - List recipes = craftingManager.getRecipeList(); - IRecipe theRecipe = null; - - for (IRecipe recipe : recipes) { - if (recipe instanceof RecipeShaped && ((RecipeShaped) recipe).recipeOutput.itemID == outputBlock.id) { - theRecipe = recipe; - break; - } else if (recipe instanceof RecipeShapeless && ((RecipeShapeless) recipe).recipeOutput.itemID == outputBlock.id) { - theRecipe = recipe; - break; - } - } - - if (theRecipe == null) { - HalpLibe.LOGGER.debug("Couldn't find crafting recipe with output: " + outputBlock.getKey()); - return; - } - - recipes.remove(theRecipe); - ((CraftingManagerAccessor) craftingManager).setRecipes(recipes); + craftingManager.addShapelessRecipe(stack, aobj); } } @Deprecated @@ -161,30 +56,6 @@ public static void createRecipe(Block outputItem, Item inputItem) { public static void createRecipe(Block outputItem, Block inputItem) { smeltingManager.addSmelting(inputItem.id, new ItemStack(outputItem)); } - - public static void removeRecipe(Item inputItem) { - Map recipes = smeltingManager.getSmeltingList(); - - if (!recipes.containsKey(inputItem)) { - HalpLibe.LOGGER.debug("Couldn't find smelting recipe with input: " + inputItem.getKey()); - return; - } - - recipes.remove(inputItem); - ((RecipesFurnaceAccessor) smeltingManager).setSmeltingList(recipes); - } - - public static void removeRecipe(Block inputItem) { - Map recipes = smeltingManager.getSmeltingList(); - - if (!recipes.containsKey(inputItem)) { - HalpLibe.LOGGER.debug("Couldn't find smelting recipe with input: " + inputItem.getKey()); - return; - } - - recipes.remove(inputItem); - ((RecipesFurnaceAccessor) smeltingManager).setSmeltingList(recipes); - } } @Deprecated @@ -204,30 +75,6 @@ public static void createRecipe(Block outputItem, Item inputItem) { public static void createRecipe(Block outputItem, Block inputItem) { blastingManager.addSmelting(inputItem.id, new ItemStack(outputItem)); } - - public static void removeRecipe(Item inputItem) { - Map recipes = blastingManager.getSmeltingList(); - - if (!recipes.containsKey(inputItem)) { - HalpLibe.LOGGER.debug("Couldn't find blasting recipe with input: " + inputItem.getKey()); - return; - } - - recipes.remove(inputItem); - ((RecipesBlastFurnaceAccessor) blastingManager).setSmeltingList(recipes); - } - - public static void removeRecipe(Block inputItem) { - Map recipes = blastingManager.getSmeltingList(); - - if (!recipes.containsKey(inputItem)) { - HalpLibe.LOGGER.debug("Couldn't find blasting recipe with input: " + inputItem.getKey()); - return; - } - - recipes.remove(inputItem); - ((RecipesBlastFurnaceAccessor) blastingManager).setSmeltingList(recipes); - } } } diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/BlockAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/BlockAccessor.java index 816bbd8..b6c73d0 100644 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/BlockAccessor.java +++ b/src/main/java/turniplabs/halplibe/mixin/accessors/BlockAccessor.java @@ -14,15 +14,6 @@ public interface BlockAccessor { @Invoker("withBlastResistance") Block callSetResistance(float f); - @Invoker("withLightOpacity") - Block callSetLightOpacity(int i); - - @Invoker("withLightValue") - Block callSetLightValue(float f); - - @Invoker("withLightValue") - Block callSetLightValue(int i); - @Invoker("withImmovableFlagSet") Block callSetImmovable(); @@ -31,13 +22,9 @@ public interface BlockAccessor { @Invoker("withLitInteriorSurface") Block callSetIsLitInteriorSurface(boolean isLit); - @Invoker Block callWithDisabledNeighborNotifyOnMetadataChange(); - @Invoker - Block callSetTickOnLoad(boolean tickOnLoad); - @Accessor("key") void halplibe$setKey(String key); } diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/CraftingManagerAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/CraftingManagerAccessor.java deleted file mode 100644 index 8318c42..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/CraftingManagerAccessor.java +++ /dev/null @@ -1,23 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.core.crafting.CraftingManager; -import net.minecraft.core.crafting.recipe.IRecipe; -import net.minecraft.core.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; -import org.spongepowered.asm.mixin.gen.Invoker; - -import java.util.List; - -@Mixin(value = CraftingManager.class, remap = false) -public interface CraftingManagerAccessor { - - @Invoker("addRecipe") - void callAddRecipe(ItemStack itemstack, Object[] aobj); - - @Invoker("addShapelessRecipe") - void callAddShapelessRecipe(ItemStack itemstack, Object[] aobj); - - @Accessor("recipes") - void setRecipes(List list); -} diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesBlastFurnaceAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesBlastFurnaceAccessor.java deleted file mode 100644 index dc42493..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesBlastFurnaceAccessor.java +++ /dev/null @@ -1,14 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.core.crafting.recipe.RecipesBlastFurnace; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -import java.util.Map; - -@Mixin(value = RecipesBlastFurnace.class, remap = false) -public interface RecipesBlastFurnaceAccessor { - - @Accessor("smeltingList") - void setSmeltingList(Map map); -} diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesFurnaceAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesFurnaceAccessor.java deleted file mode 100644 index 60daa80..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/RecipesFurnaceAccessor.java +++ /dev/null @@ -1,14 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.core.crafting.recipe.RecipesFurnace; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -import java.util.Map; - -@Mixin(value = RecipesFurnace.class, remap = false) -public interface RecipesFurnaceAccessor { - - @Accessor("smeltingList") - void setSmeltingList(Map map); -} diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/RenderPlayerAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/RenderPlayerAccessor.java deleted file mode 100644 index e0cb6d2..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/RenderPlayerAccessor.java +++ /dev/null @@ -1,19 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.client.render.entity.PlayerRenderer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(value = PlayerRenderer.class, remap = false) -public interface RenderPlayerAccessor { - - @Accessor("armorFilenamePrefix") - static String[] getArmorFilenamePrefix() { - throw new AssertionError(); - } - - @Accessor("armorFilenamePrefix") - static void setArmorFilenamePrefix(String[] strings) { - throw new AssertionError(); - } -} diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/EntityClientPlayerMPMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/EntityClientPlayerMPMixin.java index 47a330b..5bbf3a9 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/EntityClientPlayerMPMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/EntityClientPlayerMPMixin.java @@ -3,8 +3,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.EntityClientPlayerMP; import net.minecraft.client.entity.player.EntityPlayerSP; +import net.minecraft.client.util.helper.Colors; import net.minecraft.core.net.command.*; -import net.minecraft.core.util.helper.Colors; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/GuiIngameMenuMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/GuiIngameMenuMixin.java index e67003e..1bcd911 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/GuiIngameMenuMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/GuiIngameMenuMixin.java @@ -23,8 +23,7 @@ public class GuiIngameMenuMixin extends GuiScreen { ) protected void buttonPressed(GuiButton guibutton, CallbackInfo ci) { if (guibutton.id == 5) { - GuiIngameMenu trueThis = (GuiIngameMenu)((Object)this); - this.mc.displayGuiScreen(new GuiAchievements(trueThis, Minecraft.getMinecraft(this).statsCounter)); + this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.statsCounter)); ci.cancel(); } } diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/RenderGlobalMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/RenderGlobalMixin.java index fe78286..3a5e7c5 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/RenderGlobalMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/RenderGlobalMixin.java @@ -1,8 +1,8 @@ package turniplabs.halplibe.mixin.mixins; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.fx.EntityFX; import net.minecraft.client.render.RenderGlobal; -import net.minecraft.core.entity.fx.EntityFX; import net.minecraft.core.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftMixin.java index d6e10fd..f251cf2 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/registry/MinecraftMixin.java @@ -2,6 +2,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.core.achievement.stat.StatList; +import net.minecraft.core.lang.I18n; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -19,6 +20,7 @@ public void postInit(CallbackInfo ci) { m.setAccessible(true); m.invoke(null); m.setAccessible(false); + I18n.initialize("en_US"); StatList.init(); StatList.onBlockInit(); StatList.onItemInit(); diff --git a/src/main/java/turniplabs/halplibe/util/TextureHandler.java b/src/main/java/turniplabs/halplibe/util/TextureHandler.java index 4df7ac1..4a2ef7b 100644 --- a/src/main/java/turniplabs/halplibe/util/TextureHandler.java +++ b/src/main/java/turniplabs/halplibe/util/TextureHandler.java @@ -2,7 +2,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.render.dynamictexture.DynamicTexture; -import net.minecraft.core.util.helper.Textures; +import net.minecraft.client.util.helper.Textures; import turniplabs.halplibe.helper.TextureHelper; import java.awt.image.BufferedImage; diff --git a/src/main/java/turniplabs/halplibe/util/achievements/GuiAchievements.java b/src/main/java/turniplabs/halplibe/util/achievements/GuiAchievements.java index f46619c..74dc770 100644 --- a/src/main/java/turniplabs/halplibe/util/achievements/GuiAchievements.java +++ b/src/main/java/turniplabs/halplibe/util/achievements/GuiAchievements.java @@ -170,11 +170,11 @@ public void drawAchievementBackground(int x, int y, float renderPartialTicks) { if(posY < top){ posY = top; } - if(posX >= right){ - posX = right - 1; + if(posX > right){ + posX = right; } - if(posY >= bottom){ - posY = bottom - 1; + if(posY > bottom){ + posY = bottom; } int blockTex = this.mc.renderEngine.getTexture("/terrain.png"); int bgTex = this.mc.renderEngine.getTexture("/achievement/bg.png"); diff --git a/src/main/java/turniplabs/halplibe/util/achievements/VanillaAchievementsPage.java b/src/main/java/turniplabs/halplibe/util/achievements/VanillaAchievementsPage.java index 94096cb..610b2da 100644 --- a/src/main/java/turniplabs/halplibe/util/achievements/VanillaAchievementsPage.java +++ b/src/main/java/turniplabs/halplibe/util/achievements/VanillaAchievementsPage.java @@ -1,16 +1,11 @@ package turniplabs.halplibe.util.achievements; -import net.minecraft.client.Minecraft; import net.minecraft.client.render.TextureFX; import net.minecraft.core.Global; -import net.minecraft.core.achievement.Achievement; import net.minecraft.core.achievement.AchievementList; -import net.minecraft.core.achievement.stat.StatStringFormatKeyInv; import net.minecraft.core.block.Block; -import net.minecraft.core.item.Item; import net.minecraft.core.util.helper.Side; import org.lwjgl.opengl.GL11; -import turniplabs.halplibe.HalpLibe; import java.util.Random; diff --git a/src/main/resources/halplibe.mixins.json b/src/main/resources/halplibe.mixins.json index 7d73bdb..ed31766 100644 --- a/src/main/resources/halplibe.mixins.json +++ b/src/main/resources/halplibe.mixins.json @@ -6,14 +6,10 @@ "mixins": [ "accessors.BlockAccessor", "accessors.BlockFireAccessor", - "accessors.CraftingManagerAccessor", "accessors.DimensionAccessor", "accessors.EntityListAccessor", "accessors.LanguageAccessor", - "accessors.RecipesBlastFurnaceAccessor", - "accessors.RecipesFurnaceAccessor", "accessors.RenderManagerAccessor", - "accessors.RenderPlayerAccessor", "accessors.TileEntityAccessor", "accessors.TileEntityRendererAccessor", "mixins.BlockFireMixin",