Fixed license and unused imports

This commit is contained in:
drcrazy 2018-12-12 16:14:36 +03:00
parent 08b8039e9f
commit 83fd409e94
6 changed files with 24 additions and 7 deletions

View file

@ -1,3 +1,27 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.api;
import net.minecraft.block.state.IBlockState;

View file

@ -27,7 +27,6 @@ package techreborn.init;
import net.minecraft.item.ItemStack;
import techreborn.api.TechRebornAPI;
import techreborn.blocks.cable.EnumCableType;
import techreborn.compat.CompatManager;
import techreborn.config.ConfigTechReborn;
import techreborn.items.ingredients.ItemIngots;
import techreborn.items.ingredients.ItemParts;

View file

@ -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){

View file

@ -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) {

View file

@ -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;
/**

View file

@ -27,7 +27,6 @@ package techreborn.tiles.generator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.fml.common.Optional;
import reborncore.api.IToolDrop;
import reborncore.api.power.EnumPowerTier;
import reborncore.common.powerSystem.TilePowerAcceptor;