use fakeplayer for canSilkHarvest. Fixes #5090

This commit is contained in:
Thiakil authored and Dave Smith committed 2019-02-26 06:43:19 -07:00
1 parent 390eac1dcf
commit 7f594d76db
1 file changed
+2 -1
@@ -16,6 +16,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
public final class MinerUtils
@@ -42,7 +43,7 @@ public final class MinerUtils
return Collections.EMPTY_LIST;
}
if(silk && (block.canSilkHarvest(world, obj.getPos(), state, null) || specialSilkIDs.contains(block)))
if(silk && (block.canSilkHarvest(world, obj.getPos(), state, Mekanism.proxy.getDummyPlayer((WorldServer)world).get()) || specialSilkIDs.contains(block)))
{
List<ItemStack> ret = new ArrayList<>();
if (getSilkTouchDrop != null)