mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
stopped the breaker from mining liquids because it doesn't make any sense anyways
This commit is contained in:
parent
124df2dd70
commit
65be29dbb5
1 changed files with 4 additions and 1 deletions
|
@ -16,12 +16,15 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockAir;
|
import net.minecraft.block.BlockAir;
|
||||||
|
import net.minecraft.block.BlockLiquid;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraftforge.event.ForgeEventFactory;
|
import net.minecraftforge.event.ForgeEventFactory;
|
||||||
|
import net.minecraftforge.fluids.BlockFluidBase;
|
||||||
|
import net.minecraftforge.fluids.IFluidBlock;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -85,7 +88,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{
|
||||||
BlockPos coordsBlock = this.pos.offset(sideToManipulate);
|
BlockPos coordsBlock = this.pos.offset(sideToManipulate);
|
||||||
IBlockState stateToBreak = this.worldObj.getBlockState(coordsBlock);
|
IBlockState stateToBreak = this.worldObj.getBlockState(coordsBlock);
|
||||||
Block blockToBreak = stateToBreak.getBlock();
|
Block blockToBreak = stateToBreak.getBlock();
|
||||||
if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(stateToBreak, this.worldObj, coordsBlock) > -1.0F){
|
if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && !(blockToBreak instanceof BlockLiquid) && !(blockToBreak instanceof IFluidBlock) && blockToBreak.getBlockHardness(stateToBreak, this.worldObj, coordsBlock) >= 0.0F){
|
||||||
List<ItemStack> drops = blockToBreak.getDrops(this.worldObj, coordsBlock, stateToBreak, 0);
|
List<ItemStack> drops = blockToBreak.getDrops(this.worldObj, coordsBlock, stateToBreak, 0);
|
||||||
float chance = ForgeEventFactory.fireBlockHarvesting(drops, this.worldObj, coordsBlock, this.worldObj.getBlockState(coordsBlock), 0, 1, false, null);
|
float chance = ForgeEventFactory.fireBlockHarvesting(drops, this.worldObj, coordsBlock, this.worldObj.getBlockState(coordsBlock), 0, 1, false, null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue