Fix #347 again...
Lit redstone ore has no item attached to it, so the method was wrongly returning false after I added the null item check
This commit is contained in:
parent
d5dc5bf328
commit
a30b908e80
1 changed files with 4 additions and 3 deletions
|
@ -33,12 +33,13 @@ public class RitualEffectMagnetic extends RitualEffect
|
||||||
|
|
||||||
public static boolean isBlockOre(Block block, int meta)
|
public static boolean isBlockOre(Block block, int meta)
|
||||||
{
|
{
|
||||||
if (block == null || Item.getItemFromBlock(block) == null)
|
//Special case for lit redstone ore
|
||||||
return false;
|
|
||||||
|
|
||||||
if (block instanceof BlockOre || block instanceof BlockRedstoneOre)
|
if (block instanceof BlockOre || block instanceof BlockRedstoneOre)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (block == null || Item.getItemFromBlock(block) == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
ItemType type = new ItemType(block, meta);
|
ItemType type = new ItemType(block, meta);
|
||||||
Boolean result = oreBlockCache.get(type);
|
Boolean result = oreBlockCache.get(type);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue