mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
use fakeplayer for canSilkHarvest. Fixes #5090
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user