Skip to content

Commit

Permalink
Update to forge 1.12
Browse files Browse the repository at this point in the history
Small name changes mostly
  • Loading branch information
rolandoislas committed Jun 24, 2017
1 parent 9769a51 commit 0c74873
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 12 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand All @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Empty file modified gradlew
100644 → 100755
Empty file.
Binary file removed lib/InventoryTweaks-deobf-1.62-dev-77.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -102,15 +102,15 @@ 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;
if (color > 0) {
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();
}
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/rolandoislas/multihotbar/MultiHotbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/rolandoislas/multihotbar/gui/GuiFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends GuiScreen> mainConfigGuiClass() {
return GuiConfig.class;
Expand Down

0 comments on commit 0c74873

Please sign in to comment.