diff options
author | Raven Szewczyk <git@eigenraven.me> | 2023-02-10 14:32:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 14:32:09 +0000 |
commit | ce3825fdbc4bacb5efe6cf18a445719c02b53fa4 (patch) | |
tree | 46d81e34516b2cc044653d97c2b426f70fb11d20 /src/main/java/gregtech/api/metatileentity | |
parent | f069e4fa8875869cc07a7613e593903aa1a51d50 (diff) | |
download | GT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.tar.gz GT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.tar.bz2 GT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.zip |
Rfg cleanup (#1726)
* Update buildscript, add all recently added gradle.properties entries
* Dependency version bumps and cleanup
* Bump eternal singularity version
* Update buildscript
* Make AE2 a required dependency
* Switch version to class generation from token replacement
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 22 | ||||
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/MetaTileEntity.java | 12 |
2 files changed, 3 insertions, 31 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index d8a512c954..8cf45d1984 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -49,7 +49,6 @@ import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructableProvider; -import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -80,16 +79,6 @@ import ic2.api.Direction; * <p/> * This is the main TileEntity for EVERYTHING. */ -@Optional.InterfaceList( - value = { - @Optional.Interface( - iface = "appeng.api.networking.security.IActionHost", - modid = "appliedenergistics2", - striprefs = true), - @Optional.Interface( - iface = "appeng.me.helpers.IGridProxyable", - modid = "appliedenergistics2", - striprefs = true) }) public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTechTileEntity, IActionHost, IGridProxyable, IAlignmentProvider, IConstructableProvider, IDebugableTileEntity, IGregtechWailaProvider { @@ -2329,7 +2318,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } @Override - @Optional.Method(modid = "appliedenergistics2") public IGridNode getGridNode(ForgeDirection forgeDirection) { if (mFacing != forgeDirection.ordinal()) return null; final AENetworkProxy gp = getProxy(); @@ -2337,61 +2325,51 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } @Override - @Optional.Method(modid = "appliedenergistics2") public AECableType getCableConnectionType(ForgeDirection forgeDirection) { return mMetaTileEntity == null ? AECableType.NONE : mMetaTileEntity.getCableConnectionType(forgeDirection); } @Override - @Optional.Method(modid = "appliedenergistics2") public void securityBreak() {} @Override - @Optional.Method(modid = "appliedenergistics2") public IGridNode getActionableNode() { final AENetworkProxy gp = getProxy(); return gp != null ? gp.getNode() : null; } @Override - @Optional.Method(modid = "appliedenergistics2") public AENetworkProxy getProxy() { return mMetaTileEntity == null ? null : mMetaTileEntity.getProxy(); } @Override - @Optional.Method(modid = "appliedenergistics2") public DimensionalCoord getLocation() { return new DimensionalCoord(this); } @Override - @Optional.Method(modid = "appliedenergistics2") public void gridChanged() { if (mMetaTileEntity != null) mMetaTileEntity.gridChanged(); } @TileEvent(TileEventType.WORLD_NBT_READ) - @Optional.Method(modid = "appliedenergistics2") public void readFromNBT_AENetwork(final NBTTagCompound data) { final AENetworkProxy gp = getProxy(); if (gp != null) getProxy().readFromNBT(data); } @TileEvent(TileEventType.WORLD_NBT_WRITE) - @Optional.Method(modid = "appliedenergistics2") public void writeToNBT_AENetwork(final NBTTagCompound data) { final AENetworkProxy gp = getProxy(); if (gp != null) gp.writeToNBT(data); } - @Optional.Method(modid = "appliedenergistics2") void onChunkUnloadAE() { final AENetworkProxy gp = getProxy(); if (gp != null) gp.onChunkUnload(); } - @Optional.Method(modid = "appliedenergistics2") void invalidateAE() { final AENetworkProxy gp = getProxy(); if (gp != null) gp.invalidate(); diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index 64bc531947..26caeaa416 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -39,8 +39,6 @@ import appeng.me.helpers.AENetworkProxy; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gnu.trove.list.TIntList; @@ -151,7 +149,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac /** * This method will only be called on client side - * + * * @return whether the secondary description should be display. default is false */ @Deprecated @@ -1164,17 +1162,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac // === AE2 compat === - @Optional.Method(modid = "appliedenergistics2") public AECableType getCableConnectionType(ForgeDirection forgeDirection) { return AECableType.NONE; } - @Optional.Method(modid = "appliedenergistics2") public AENetworkProxy getProxy() { return null; } - @Optional.Method(modid = "appliedenergistics2") public void gridChanged() {} // === Waila compat === @@ -1187,7 +1182,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac "Facing: %s", ForgeDirection.getOrientation(mBaseMetaTileEntity.getFrontFacing()).name())); - if (Loader.isModLoaded("appliedenergistics2") && this instanceof IPowerChannelState) { + if (this instanceof IPowerChannelState) { // adapted from PowerStateWailaDataProvider final IPowerChannelState state = (IPowerChannelState) this; NBTTagCompound tag = accessor.getNBTData(); @@ -1210,7 +1205,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { - if (Loader.isModLoaded("appliedenergistics2") && this instanceof IPowerChannelState) { + if (this instanceof IPowerChannelState) { // adapted from PowerStateWailaDataProvider final IPowerChannelState state = (IPowerChannelState) this; final boolean isActive = state.isActive(); @@ -1222,7 +1217,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } } - @Optional.Method(modid = "appliedenergistics2") protected String getAEDiagnostics() { try { if (getProxy() == null) return "(proxy)"; |