#1600 Travel Anchor crashes when repainted with itself

This commit is contained in:
tterrag1098 committed 2015-01-06 16:11:04 -05:00
1 parent c386c08c02
commit 0ca7bf783e
1 file changed
+3 -1
@@ -214,6 +214,9 @@ public class BlockTravelAnchor extends BlockEio implements IGuiHandler, ITileEnt
}
public ItemStack createItemStackForSourceBlock(Block block, int damage) {
if(block == this) {
return new ItemStack(this);
}
ItemStack result = new ItemStack(this, 1, damage);
PainterUtil.setSourceBlock(result, block, damage);
return result;
@@ -238,7 +241,6 @@ public class BlockTravelAnchor extends BlockEio implements IGuiHandler, ITileEnt
}
return new ResultStack[] { new ResultStack(createItemStackForSourceBlock(Block.getBlockFromItem(paintSource.getItem()), paintSource.getItemDamage())) };
}
}
@Override