diff --git a/build.gradle b/build.gradle index 4adeb9d..cc624ae 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.0" +version = "1.0.1" group= "com.trcx.swapper" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "swapper" diff --git a/src/main/java/com/trcx/swapper/Common/Item/Swapper.java b/src/main/java/com/trcx/swapper/Common/Item/Swapper.java index c6bf083..77a7ca9 100644 --- a/src/main/java/com/trcx/swapper/Common/Item/Swapper.java +++ b/src/main/java/com/trcx/swapper/Common/Item/Swapper.java @@ -297,8 +297,10 @@ public ItemStack onEaten(ItemStack swapper, World world, EntityPlayer player) { public ItemStack onItemRightClick(ItemStack swapper, World world, EntityPlayer player) { if (player.isSneaking()) { if (!world.isRemote) - if (swapper.stackTagCompound.hasKey("ench")) - swapper.stackTagCompound.removeTag("ench"); + if (swapper!=null && swapper.hasTagCompound()) { + if (swapper.stackTagCompound.hasKey("ench")) + swapper.stackTagCompound.removeTag("ench"); + } player.openGui(Main.instance, 0, world, 0, 0, 0); } else { ItemStack is = getStack(slotRightClick, swapper); diff --git a/src/main/java/com/trcx/swapper/Main.java b/src/main/java/com/trcx/swapper/Main.java index 97c0eb5..d434f6e 100644 --- a/src/main/java/com/trcx/swapper/Main.java +++ b/src/main/java/com/trcx/swapper/Main.java @@ -20,7 +20,7 @@ @Mod(modid = "swapper", version = Main.VERSION, name = "Swapper") public class Main { - public static final String VERSION = "1.0.0"; + public static final String VERSION = "1.0.1"; public static Item Swapper; public static String[] swapperBlacklist = new String[2];