mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-17 19:15:24 +00:00
Fixed #99
This commit is contained in:
1 parent
41bf3bfdbb
commit
c8be69796f
1 file changed
+5
-10
@@ -4,7 +4,9 @@ import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import binnie.core.util.TileUtil;
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
@@ -34,7 +36,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
class BlockMachine extends BlockContainer implements IBlockMachine {
|
||||
class BlockMachine extends Block implements IBlockMachine, ITileEntityProvider {
|
||||
public static final PropertyInteger MACHINE_TYPE = PropertyInteger.create("machine_type", 0, 15);
|
||||
private MachineGroup group;
|
||||
|
||||
@@ -177,17 +179,10 @@ class BlockMachine extends BlockContainer implements IBlockMachine {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) {
|
||||
if (BinnieCore.getBinnieProxy().isSimulating(world) && this.canHarvestBlock(world, pos, player) && !player.capabilities.isCreativeMode) {
|
||||
//final int metadata = this.getMetaFromState(state);
|
||||
//final ItemStack stack = new ItemStack(Item.getItemFromBlock(this), 1, this.damageDropped(state));
|
||||
this.dropBlockAsItem(world, pos, state, 0);
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
return super.removedByPlayer(state, world, pos, player, willHarvest);
|
||||
}
|
||||
return world.setBlockToAir(pos);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user