Merge pull request #432 from thatsIch/portcell
Potentially fixes #287 by removing the second call hook to open the GUI of the portable cell
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.items.tools.powered;
|
package appeng.items.tools.powered;
|
||||||
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -27,6 +28,7 @@ import net.minecraft.inventory.IInventory;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||||
@@ -49,10 +51,11 @@ import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
|||||||
import appeng.me.storage.CellInventoryHandler;
|
import appeng.me.storage.CellInventoryHandler;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, IGuiItem, IItemGroup
|
public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, IGuiItem, IItemGroup
|
||||||
{
|
{
|
||||||
|
public ToolPortableCell()
|
||||||
public ToolPortableCell() {
|
{
|
||||||
super( ToolPortableCell.class, null );
|
super( ToolPortableCell.class, null );
|
||||||
setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) );
|
setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) );
|
||||||
maxStoredPower = AEConfig.instance.portableCellBattery;
|
maxStoredPower = AEConfig.instance.portableCellBattery;
|
||||||
@@ -65,14 +68,6 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onItemUse(ItemStack item, EntityPlayer player, World w, int x, int y, int z, int side,
|
|
||||||
float hitX, float hitY, float hitZ)
|
|
||||||
{
|
|
||||||
onItemRightClick( item, w, player );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCheckedInformation( ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
|
public void addCheckedInformation( ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user