mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
fix chorus flower digital mining
This commit is contained in:
1 parent
0640cd3477
commit
362f724c9e
1 file changed
+5
-1
@@ -20,7 +20,7 @@ import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public final class MinerUtils
|
||||
{
|
||||
public static List<Block> specialSilkIDs = ListUtils.asList(Blocks.ICE);
|
||||
public static List<Block> specialSilkIDs = ListUtils.asList(Blocks.ICE,Blocks.CHORUS_FLOWER);
|
||||
|
||||
private static Method getSilkTouchDrop = null;
|
||||
static {
|
||||
@@ -53,6 +53,8 @@ public final class MinerUtils
|
||||
if (it != null && it instanceof ItemStack && !((ItemStack)it).isEmpty())
|
||||
{
|
||||
ret.add((ItemStack)it);
|
||||
} else if (it != null && it instanceof ItemStack && ((ItemStack)it).isEmpty()){//silk touch drop is empty, fallback to grabbing an itemblock
|
||||
fallbackGetSilkTouch(block, state, ret);
|
||||
}
|
||||
} catch (InvocationTargetException|IllegalAccessException e){
|
||||
Mekanism.logger.error("Block.getSilkTouchDrop errored", e);
|
||||
@@ -75,6 +77,8 @@ public final class MinerUtils
|
||||
if (blockDrops.size() > 0)
|
||||
{
|
||||
net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(blockDrops, world, obj.getPos(), state, 0, 1.0f, false, null);
|
||||
} else if (block == Blocks.CHORUS_FLOWER){//Chorus flower returns AIR for itemDropped... and for silkTouchDrop.
|
||||
blockDrops.add(new ItemStack(Blocks.CHORUS_FLOWER));
|
||||
}
|
||||
return blockDrops;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user