Fix "?" render!

This commit is contained in:
Towdium committed 2016-02-27 00:15:15 +08:00
1 parent 59caf8dbbd
commit 2dac28a374
3 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "0.1.1"
version = "0.1.2"
group= "pers.towdium.justEnoughcalculation" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "je_calculation"
@@ -45,7 +45,7 @@ public class JustEnoughCalculation {
public static class Reference {
public static final String MODID = "je_calculation";
public static final String MODNAME = "Just Enough Calculation";
public static final String VERSION = "0.1.1";
public static final String VERSION = "0.1.2";
}
@Mod.EventHandler
@@ -10,6 +10,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
/**
* CODE IS DONE BY Zyin055
@@ -57,9 +58,12 @@ public abstract class GuiTooltipScreen extends GuiContainer
field = GuiContainer.class.getDeclaredField("theSlot");
field.setAccessible(true);
theSlot = (Slot) field.get(this);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception ignored) {}
try {
field = GuiContainer.class.getDeclaredField("field_147006_u");
field.setAccessible(true);
theSlot = (Slot) field.get(this);
} catch (Exception ignored) {}
if (inventoryplayer.getItemStack() == null && theSlot != null && theSlot.getHasStack())
{
ItemStack itemstack1 = theSlot.getStack();