mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Might fix some blocks not working with the Drill?
This commit is contained in:
parent
37d2aa8968
commit
1c07b56920
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ForgeHooks;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -502,7 +503,7 @@ public class ItemDrill extends ItemEnergy{
|
||||||
Block block = world.getBlock(xPos, yPos, zPos);
|
Block block = world.getBlock(xPos, yPos, zPos);
|
||||||
float hardness = block.getBlockHardness(world, xPos, yPos, zPos);
|
float hardness = block.getBlockHardness(world, xPos, yPos, zPos);
|
||||||
int meta = world.getBlockMetadata(xPos, yPos, zPos);
|
int meta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||||
boolean canHarvest = this.canHarvestBlock(block, stack) && (!isExtra || this.getDigSpeed(stack, block, meta) > 1.0F);
|
boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, meta) || this.canHarvestBlock(block, stack)) && (!isExtra || this.getDigSpeed(stack, block, meta) > 1.0F);
|
||||||
if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(meta)))){
|
if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(meta)))){
|
||||||
this.extractEnergy(stack, use, false);
|
this.extractEnergy(stack, use, false);
|
||||||
//Break the Block
|
//Break the Block
|
||||||
|
|
Loading…
Reference in a new issue