Fixed license and unused imports
This commit is contained in:
parent
08b8039e9f
commit
83fd409e94
6 changed files with 24 additions and 7 deletions
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -70,7 +69,6 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo {
|
|||
@Override
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
IBlockState state = worldIn.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
IEnergyStorage capEnergy = playerIn.getHeldItem(hand).getCapability(CapabilityEnergy.ENERGY, null);
|
||||
if(TechRebornAPI.ic2Helper != null && capEnergy.getEnergyStored() >= cost){
|
||||
if(TechRebornAPI.ic2Helper.extractSap(playerIn, worldIn, pos, side, state, null) && !worldIn.isRemote){
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -49,7 +48,6 @@ public class ItemTreeTap extends ItemTR {
|
|||
@Override
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
IBlockState state = worldIn.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
if(TechRebornAPI.ic2Helper != null){
|
||||
if(TechRebornAPI.ic2Helper.extractSap(playerIn, worldIn, pos, side, state, null)){
|
||||
if (!worldIn.isRemote) {
|
||||
|
|
|
@ -37,7 +37,6 @@ import net.minecraftforge.server.permission.PermissionAPI;
|
|||
import net.minecraftforge.server.permission.context.BlockPosContext;
|
||||
import reborncore.api.IToolHandler;
|
||||
import reborncore.common.util.RebornPermissions;
|
||||
import techreborn.compat.CompatManager;
|
||||
import techreborn.items.ItemTR;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue