Skip to content

Commit

Permalink
Merge pull request Mithion#1236 from DoomFruit/WardingCandleFix
Browse files Browse the repository at this point in the history
Fix for issue Mithion#1131 (warding candle crash on redstone ore)
  • Loading branch information
Mithion committed Sep 12, 2015
2 parents 1b0b0bc + 02cb49d commit 2cfc581
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/main/java/am2/items/ItemCandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int
if (!world.isRemote){

if (stack.hasTagCompound() && stack.stackTagCompound.hasKey("search_block")){
player.addChatMessage(new ChatComponentText("am2.tooltip.candlecantplace"));
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("am2.tooltip.candlecantplace")));
return false;
}

Expand Down Expand Up @@ -171,7 +171,13 @@ public String getItemStackDisplayName(ItemStack stack){
String name = StatCollector.translateToLocal("item.arsmagica2:warding_candle.name");
if (stack.hasTagCompound() && stack.stackTagCompound.hasKey("search_block")){
ItemStack blockStack = new ItemStack(Block.getBlockById(stack.stackTagCompound.getInteger("search_block")), 1, stack.stackTagCompound.getInteger("search_meta"));
name += " (" + blockStack.getDisplayName() + ")";
Item tempItem = blockStack.getItem();
if(tempItem == null){
name += " (" + stack.stackTagCompound.getInteger("search_block") + ":" + stack.stackTagCompound.getInteger("search_meta") + ")";
}
else{
name += " (" + blockStack.getDisplayName() + ")";
}
}else{
name += " (" + StatCollector.translateToLocal("am2.tooltip.unattuned") + ")";
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/arsmagica2/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -691,4 +691,4 @@ achievement.componentUnlock=Discovered Spell Part

Legendary Mana Restoration.postfix=Legendary Mana Potion
Epic Mana Restoration.postfix=Epic Mana Potion
Greater Mana Restoration.postfix=Greater Mana Potion
Greater Mana Restoration.postfix=Greater Mana Potion

0 comments on commit 2cfc581

Please sign in to comment.