Add energy storage to RebornCore's wrenableBlocks list
This commit is contained in:
parent
24c41f356f
commit
959e318859
1 changed files with 3 additions and 1 deletions
|
@ -51,6 +51,7 @@ import reborncore.api.IToolDrop;
|
||||||
import reborncore.api.ToolManager;
|
import reborncore.api.ToolManager;
|
||||||
import reborncore.api.tile.IUpgradeable;
|
import reborncore.api.tile.IUpgradeable;
|
||||||
import reborncore.common.BaseTileBlock;
|
import reborncore.common.BaseTileBlock;
|
||||||
|
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||||
import reborncore.common.util.WorldUtils;
|
import reborncore.common.util.WorldUtils;
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
@ -78,12 +79,13 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.guiID = guiID;
|
this.guiID = guiID;
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/energy"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/energy"));
|
||||||
|
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand,
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand,
|
||||||
EnumFacing side, float hitX, float hitY, float hitZ) {
|
EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||||
ItemStack heldStack = player.getHeldItem(hand);
|
ItemStack heldStack = player.getHeldItem(EnumHand.MAIN_HAND);
|
||||||
if(ToolManager.INSTANCE.canHandleTool(heldStack)){
|
if(ToolManager.INSTANCE.canHandleTool(heldStack)){
|
||||||
if(ToolManager.INSTANCE.handleTool(heldStack, pos, world, player, side, true)){
|
if(ToolManager.INSTANCE.handleTool(heldStack, pos, world, player, side, true)){
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
|
|
Loading…
Reference in a new issue