aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2021-07-19 15:51:27 +0800
committerGlease <4586901+Glease@users.noreply.github.com>2021-07-30 14:41:35 +0800
commitbfe1836ddc069653d9af9d59008ec23f4dcb6c05 (patch)
treed392068bb01d345501f4851756d209813f872a4b /src/main/java/gregtech/api/metatileentity
parent1cdefed2daf27b0a36032067f9af97962bf353fb (diff)
downloadGT5-Unofficial-bfe1836ddc069653d9af9d59008ec23f4dcb6c05.tar.gz
GT5-Unofficial-bfe1836ddc069653d9af9d59008ec23f4dcb6c05.tar.bz2
GT5-Unofficial-bfe1836ddc069653d9af9d59008ec23f4dcb6c05.zip
Fixes related to coil hint blocks
Also updates StructureLib to fix invisible block hint and pulled the utility methods up. Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 6eb06d8fae..1adcb41259 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -11,6 +11,8 @@ import appeng.tile.events.TileEventType;
import com.gtnewhorizon.structurelib.alignment.IAlignment;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructableProvider;
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
import cpw.mods.fml.common.Optional;
import gregtech.GT_Mod;
@@ -54,6 +56,7 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
+import javax.annotation.Nullable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
@@ -73,7 +76,7 @@ import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
@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 BaseTileEntity implements IGregTechTileEntity, IActionHost, IGridProxyable, IAlignmentProvider {
+public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileEntity, IActionHost, IGridProxyable, IAlignmentProvider, IConstructableProvider {
private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[]{GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior};
protected MetaTileEntity mMetaTileEntity;
protected long mStoredEnergy = 0, mStoredSteam = 0;
@@ -2374,6 +2377,12 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
return getMetaTileEntity() instanceof IAlignmentProvider ? ((IAlignmentProvider) getMetaTileEntity()).getAlignment() : new BasicAlignment();
}
+ @Nullable
+ @Override
+ public IConstructable getConstructable() {
+ return getMetaTileEntity() instanceof IConstructable ? (IConstructable) getMetaTileEntity() : null;
+ }
+
private class BasicAlignment implements IAlignment {
@Override