Fixed dumb cardboard boxes

This commit is contained in:
Aidan C. Brady 2014-01-22 14:37:25 -05:00
parent e11a79b3c3
commit a2c392f03d
2 changed files with 3 additions and 11 deletions

View file

@ -12,23 +12,15 @@ public class MekanismAPI
public static boolean isBlockCompatible(int id, int meta) public static boolean isBlockCompatible(int id, int meta)
{ {
boolean has = false;
for(BlockInfo i : cardboardBoxIgnore) for(BlockInfo i : cardboardBoxIgnore)
{ {
if(i.id == id && (i.meta == OreDictionary.WILDCARD_VALUE || i.meta == meta)) if(i.id == id && (i.meta == OreDictionary.WILDCARD_VALUE || i.meta == meta))
{ {
has = true; return false;
break;
} }
} }
if(!has) return true;
{
return true;
}
return false;
} }
public static void addBoxBlacklist(int id, int meta) public static void addBoxBlacklist(int id, int meta)

View file

@ -75,7 +75,7 @@ public class ItemBlockCardboardBox extends ItemBlock
int id = world.getBlockId(x, y, z); int id = world.getBlockId(x, y, z);
int meta = world.getBlockMetadata(x, y, z); int meta = world.getBlockMetadata(x, y, z);
if(!world.isRemote && !MekanismAPI.isBlockCompatible(id, meta)) if(!world.isRemote && MekanismAPI.isBlockCompatible(id, meta))
{ {
BlockData data = new BlockData(); BlockData data = new BlockData();
data.id = id; data.id = id;