Skip to content

Commit

Permalink
fixed a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Trcx528 committed Mar 18, 2015
1 parent fb2a623 commit 7d45e86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/trcx/swapper/Common/Item/Swapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/trcx/swapper/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 7d45e86

Please sign in to comment.