diff --git a/build.gradle b/build.gradle index 15ba8d4..4bc420e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { maven { url = "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.8" } } @@ -15,15 +15,15 @@ apply plugin: "com.matthewprenger.cursegradle" ext.build = System.getenv('TRAVIS_BUILD_NUMBER') ext.tag = System.getenv("TRAVIS_TAG") -version = "1.11.2-2.1.3" +version = "1.12-3.0" version = version + "-build-T" + ext.build group= "com.rolandoislas.multihotbar" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "multihotbar" minecraft { - version = "1.11.2-13.20.0.2228" + version = "1.12-14.21.0.2347" runDir = "run" - mappings = "snapshot_20161220" + mappings = "snapshot_20170617" } if (ext.tag) { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..e9b9fd5 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/lib/InventoryTweaks-deobf-1.62-dev-77.jar b/lib/InventoryTweaks-deobf-1.62-dev-77.jar deleted file mode 100644 index 8308dd2..0000000 Binary files a/lib/InventoryTweaks-deobf-1.62-dev-77.jar and /dev/null differ diff --git a/src/main/java/com/rolandoislas/multihotbar/HotBarRenderer.java b/src/main/java/com/rolandoislas/multihotbar/HotBarRenderer.java index 5e92053..5b8f62b 100644 --- a/src/main/java/com/rolandoislas/multihotbar/HotBarRenderer.java +++ b/src/main/java/com/rolandoislas/multihotbar/HotBarRenderer.java @@ -72,7 +72,7 @@ private void drawOffhandItem() { int x = coords[0] - SELECTOR_SIZE - 2; int y = coords[1] + 3; minecraft.getRenderItem().renderItemAndEffectIntoGUI(item, x, y); - minecraft.getRenderItem().renderItemOverlays(minecraft.fontRendererObj, item, x, y); + minecraft.getRenderItem().renderItemOverlays(minecraft.fontRenderer, item, x, y); RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); } @@ -102,7 +102,7 @@ private void drawTooltip() { return; ScaledResolution scaledResolution = new ScaledResolution(minecraft); int x = scaledResolution.getScaledWidth() / 2 - - minecraft.fontRendererObj.getStringWidth(item.getDisplayName()) / 2; + minecraft.fontRenderer.getStringWidth(item.getDisplayName()) / 2; int y = coords[1] - 37 + (minecraft.playerController.shouldDrawHUD() ? 0 : 14); int color = (int) (tooltipTicks * 256f / 10f); color = color > 255 ? 255 : color; @@ -110,7 +110,7 @@ private void drawTooltip() { GlStateManager.pushMatrix(); GlStateManager.enableBlend(); OpenGlHelper.glBlendFunc(770, 771, 1, 0); - minecraft.fontRendererObj.drawStringWithShadow(item.getDisplayName(), x, y, 16777215 + (color << 24)); + minecraft.fontRenderer.drawStringWithShadow(item.getDisplayName(), x, y, 16777215 + (color << 24)); GlStateManager.disableBlend(); GlStateManager.popMatrix(); } @@ -216,7 +216,7 @@ private void drawItems(int hotbarIndex, int slotIndex) { minecraft.getRenderItem().renderItemAndEffectIntoGUI(item, itemX, itemY); if (pickupAnimation > 0.0F) GlStateManager.popMatrix(); - minecraft.getRenderItem().renderItemOverlays(minecraft.fontRendererObj, item, itemX, itemY); + minecraft.getRenderItem().renderItemOverlays(minecraft.fontRenderer, item, itemX, itemY); } } RenderHelper.disableStandardItemLighting(); diff --git a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java index dd9d6fa..07d5179 100644 --- a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java +++ b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java @@ -341,10 +341,10 @@ public void pickupEvent(EntityItemPickupEvent event) { EntityPlayer player = Minecraft.getMinecraft().player; if (player == null) return; - int slot = getFirstCompatibleStack(event.getItem().getEntityItem()); + int slot = getFirstCompatibleStack(event.getItem().getItem()); if (slot >= 0) { ItemStack stack = player.inventory.getStackInSlot(slot); - if (stack.isEmpty() || stack.getCount() + event.getItem().getEntityItem().getCount() <= stack.getMaxStackSize()) + if (stack.isEmpty() || stack.getCount() + event.getItem().getItem().getCount() <= stack.getMaxStackSize()) return; } // Get the first empty stack diff --git a/src/main/java/com/rolandoislas/multihotbar/MultiHotbar.java b/src/main/java/com/rolandoislas/multihotbar/MultiHotbar.java index d0938c6..afe74f1 100644 --- a/src/main/java/com/rolandoislas/multihotbar/MultiHotbar.java +++ b/src/main/java/com/rolandoislas/multihotbar/MultiHotbar.java @@ -14,10 +14,10 @@ public class MultiHotbar { public static final String MODID = "multihotbar"; - public static final String VERSION = "2.1.3"; + public static final String VERSION = "3.0"; public static final String NAME = "Multi-Hotbar"; // https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification - public static final String MC_VERSION = "[1.11,1.11.2]"; + public static final String MC_VERSION = "[1.12,1.13]"; @Mod.Instance(MODID) @SuppressWarnings("unused") public static MultiHotbar instance; diff --git a/src/main/java/com/rolandoislas/multihotbar/gui/GuiFactory.java b/src/main/java/com/rolandoislas/multihotbar/gui/GuiFactory.java index 845d2aa..f4458e1 100644 --- a/src/main/java/com/rolandoislas/multihotbar/gui/GuiFactory.java +++ b/src/main/java/com/rolandoislas/multihotbar/gui/GuiFactory.java @@ -15,6 +15,16 @@ public void initialize(Minecraft minecraftInstance) { } + @Override + public boolean hasConfigGui() { + return true; + } + + @Override + public GuiScreen createConfigGui(GuiScreen parentScreen) { + return new GuiConfig(parentScreen); + } + @Override public Class mainConfigGuiClass() { return GuiConfig.class;