aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
-rw-r--r--src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java58
-rw-r--r--src/main/java/gregtech/api/interfaces/IFluidAccess.java26
-rw-r--r--src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java98
-rw-r--r--src/main/java/gregtech/api/interfaces/IGuiIcon.java19
-rw-r--r--src/main/java/gregtech/api/interfaces/IGuiScreen.java45
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java26
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java23
7 files changed, 1 insertions, 294 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java
deleted file mode 100644
index b516db5bad..0000000000
--- a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package gregtech.api.interfaces;
-
-import java.util.Collections;
-import java.util.List;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.item.ItemStack;
-
-import codechicken.nei.NEIClientUtils;
-import codechicken.nei.VisiblityData;
-import codechicken.nei.api.INEIGuiHandler;
-import codechicken.nei.api.TaggedInventoryArea;
-import cpw.mods.fml.common.Optional;
-import gregtech.api.enums.Mods;
-
-/**
- * Implement this interface if your GuiContainer supports Drag-And-Drop behavior on NEI.
- */
-@Optional.Interface(modid = Mods.Names.NOT_ENOUGH_ITEMS, iface = "codechicken.nei.api.INEIGuiHandler")
-public interface IDragAndDropSupport extends INEIGuiHandler {
-
- /**
- * Implement this to handle Drag-And-Drop behavior. This may be invoked on normal click too
- * ({@code isGhost==false}), so be careful if your slot supports both Drag-And-Drop and other behaviors e.g. fluid
- * I/O with FluidDisplay click
- *
- * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer.
- * @param mousex X position of the mouse
- * @param mousey Y position of the mouse
- * @param draggedStack ItemStack user is holding on cursor
- * @param button 0 = left click, 1 = right click
- * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player
- * holds
- * @return True if success
- */
- boolean handleDragAndDropGT(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button,
- boolean isGhost);
-
- default boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) {
- return handleDragAndDropGT(gui, mousex, mousey, draggedStack, button, NEIClientUtils.getHeldItem() == null);
- }
-
- default VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) {
- return currentVisibility;
- }
-
- default Iterable<Integer> getItemSpawnSlots(GuiContainer gui, ItemStack item) {
- return Collections.emptyList();
- }
-
- default List<TaggedInventoryArea> getInventoryAreas(GuiContainer gui) {
- return null;
- }
-
- default boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
- return false;
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IFluidAccess.java b/src/main/java/gregtech/api/interfaces/IFluidAccess.java
deleted file mode 100644
index 8fa9b3a3fa..0000000000
--- a/src/main/java/gregtech/api/interfaces/IFluidAccess.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraftforge.fluids.FluidStack;
-
-public interface IFluidAccess {
-
- void set(FluidStack stack);
-
- FluidStack get();
-
- int getCapacity();
-
- default int getRealCapacity() {
- return getCapacity();
- }
-
- default void addAmount(int amount) {
- if (get() != null) {
- get().amount = Math.min(get().amount + amount, getRealCapacity());
- }
- }
-
- default void verifyFluidStack() {
- if (get() != null && get().amount <= 0) set(null);
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java
deleted file mode 100644
index b931549a07..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gregtech.api.interfaces;
-
-import java.math.BigInteger;
-import java.util.UUID;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.misc.WirelessNetworkManager;
-import gregtech.common.misc.spaceprojects.SpaceProjectManager;
-
-// If you are adding very late-game content feel free to tap into this interface.
-// The eventual goal is to bypass laser/dynamo stuff and have energy deposited directly from ultra-endgame
-// multi-blocks directly into the users network.
-/**
- * Use WirelessNetworkManager instead
- */
-@Deprecated
-public interface IGlobalWirelessEnergy {
-
- // Adds a user to the energy map if they do not already exist. Otherwise, do
- // nothing. Will also check if the user
- // has changed their username and adjust the maps accordingly. This should be
- // called infrequently. Ideally on first
- // tick of a machine being placed only.
-
- default void strongCheckOrAddUser(EntityPlayer user) {
- WirelessNetworkManager.strongCheckOrAddUser(user.getUniqueID());
- }
-
- default void strongCheckOrAddUser(UUID user_uuid, String user_name) {
- WirelessNetworkManager.strongCheckOrAddUser(user_uuid);
- }
-
- default void strongCheckOrAddUser(String user_uuid, String user_name) {
- WirelessNetworkManager.strongCheckOrAddUser(UUID.fromString(user_uuid));
- }
-
- // ------------------------------------------------------------------------------------
- // Add EU to the users global energy. You can enter a negative number to
- // subtract it.
- // If the value goes below 0 it will return false and not perform the operation.
- // BigIntegers have much slower operations than longs/ints. You should call
- // these methods
- // as infrequently as possible and bulk store values to add to the global map.
- default boolean addEUToGlobalEnergyMap(String userUUID, BigInteger EU) {
- return WirelessNetworkManager.addEUToGlobalEnergyMap(UUID.fromString(userUUID), EU);
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, BigInteger EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), EU);
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, long EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, int EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(String user_uuid, long EU) {
- return addEUToGlobalEnergyMap(user_uuid, BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(String user_uuid, int EU) {
- return addEUToGlobalEnergyMap(user_uuid, BigInteger.valueOf(EU));
- }
-
- // ------------------------------------------------------------------------------------
-
- default BigInteger getUserEU(String user_uuid) {
- return WirelessNetworkManager.getUserEU(UUID.fromString(user_uuid));
- }
-
- // This overwrites the EU in the network. Only use this if you are absolutely
- // sure you know what you are doing.
- default void setUserEU(String user_uuid, BigInteger EU) {
- WirelessNetworkManager.setUserEU(UUID.fromString(user_uuid), EU);
- }
-
- default String GetUsernameFromUUID(String uuid) {
- return SpaceProjectManager.getPlayerNameFromUUID(UUID.fromString(uuid));
- }
-
- default String getUUIDFromUsername(String username) {
- return SpaceProjectManager.getPlayerUUIDFromName(username)
- .toString();
- }
-
- static void clearGlobalEnergyInformationMaps() {
- WirelessNetworkManager.clearGlobalEnergyInformationMaps();
- }
-
- default UUID processInitialSettings(final IGregTechTileEntity machine) {
- return WirelessNetworkManager.processInitialSettings(machine);
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGuiIcon.java b/src/main/java/gregtech/api/interfaces/IGuiIcon.java
deleted file mode 100644
index 0bc7408250..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGuiIcon.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package gregtech.api.interfaces;
-
-/**
- * To allow addons to make use of GT_GuiIcon
- */
-public interface IGuiIcon {
-
- int getX();
-
- int getY();
-
- int getWidth();
-
- int getHeight();
-
- int getTexId();
-
- IGuiIcon getOverlay();
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java
deleted file mode 100644
index c33838fc7f..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGuiScreen.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.renderer.entity.RenderItem;
-
-import gregtech.api.gui.widgets.GT_GuiTooltip;
-
-public interface IGuiScreen {
-
- interface IGuiElement {
-
- void onInit();
-
- default void onRemoved() {}
-
- void draw(int mouseX, int mouseY, float parTicks);
- }
-
- void addToolTip(GT_GuiTooltip toolTip);
-
- boolean removeToolTip(GT_GuiTooltip toolTip);
-
- GuiButton getSelectedButton();
-
- void clearSelectedButton();
-
- void buttonClicked(GuiButton button);
-
- int getGuiLeft();
-
- int getGuiTop();
-
- int getXSize();
-
- int getYSize();
-
- void addElement(IGuiElement element);
-
- boolean removeElement(IGuiElement element);
-
- RenderItem getItemRenderer();
-
- FontRenderer getFontRenderer();
-}
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
index 2c222e76a8..946caaa172 100644
--- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
+++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
@@ -11,7 +11,6 @@ import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
@@ -199,31 +198,6 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
boolean isFacingValid(ForgeDirection facing);
/**
- * @return the Server Side Container
- * @deprecated Use ModularUI
- */
- @Deprecated
- default Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return the Client Side GUI Container
- * @deprecated Use ModularUI
- */
- @Deprecated
- default Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * For back compatibility, you need to override this if this MetaTileEntity uses ModularUI.
- */
- default boolean useModularUI() {
- return false;
- }
-
- /**
* From new ISidedInventory
*/
boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, ItemStack aStack);
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
index 6d81d5c401..b62c3e92cf 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
@@ -1,7 +1,6 @@
package gregtech.api.interfaces.tileentity;
import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -137,7 +136,7 @@ public interface IHasWorldObjectAndCoords {
/**
* Sends a Block Event to the Client TileEntity.
- *
+ *
* @param aValue value to sync
*/
void sendBlockEvent(byte aID, byte aValue);
@@ -167,24 +166,4 @@ public interface IHasWorldObjectAndCoords {
* Function of the regular TileEntity
*/
boolean isInvalidTileEntity();
-
- /**
- * Opens the GUI with this ID of this MetaTileEntity
- *
- * @deprecated Use ModularUI
- */
- @Deprecated
- default boolean openGUI(EntityPlayer aPlayer, int aID) {
- return false;
- }
-
- /**
- * Opens the GUI with the ID = 0 of this TileEntity
- *
- * @deprecated Use ModularUI
- */
- @Deprecated
- default boolean openGUI(EntityPlayer aPlayer) {
- return false;
- }
}