Fix silk not working

This commit is contained in:
Aidan Brady 2014-01-15 17:52:29 -05:00
parent 7d69639a8a
commit 9c5ee1e7f8

View file

@ -4,12 +4,15 @@ import java.util.ArrayList;
import java.util.List;
import mekanism.api.Coord4D;
import mekanism.api.ListUtils;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public final class MinerUtils
{
public static List<Integer> specialSilkIDs = ListUtils.asList(Block.ice.blockID);
public static List<ItemStack> getDrops(World world, Coord4D obj, boolean silk)
{
Block block = Block.blocksList[obj.getBlockId(world)];
@ -34,7 +37,7 @@ public final class MinerUtils
List<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(block.blockID, 1, meta));
if(block.getBlockDropped(world, obj.xCoord, obj.yCoord, obj.zCoord, meta, 0) != null && block.getBlockDropped(world, obj.xCoord, obj.yCoord, obj.zCoord, meta, 0).size() > 0)
if(specialSilkIDs.contains(block.blockID) || (block.getBlockDropped(world, obj.xCoord, obj.yCoord, obj.zCoord, meta, 0) != null && block.getBlockDropped(world, obj.xCoord, obj.yCoord, obj.zCoord, meta, 0).size() > 0))
{
return ret;
}