From 290e3d4ddf85fa6f912f5c81028a3032fb6ca1c7 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sun, 1 Aug 2021 02:59:57 +0800 Subject: Fix off by one in cubic multi base and tooltip builder Also added a command to toggle structure lib debug print. Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> --- .../GT_MetaTileEntity_CubicMultiBlockBase.java | 57 +++------------------- 1 file changed, 6 insertions(+), 51 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/implementations') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java index de36b845b2..3854a96cda 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java @@ -13,56 +13,19 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; /** - * A simple 3x3x3 hollow cubic multiblock, that can be arbitrarily rotated, made of a single type of machine casing, accepts hatches everywhere. - * + * A simple 3x3x3 hollow cubic multiblock, that can be arbitrarily rotated, made of a single type of machine casing and accepts hatches everywhere. * Controller will be placed in front center of the structure. *
* Note: You cannot use different casing for the same Class. Make a new subclass for it. You also should not change the casing * dynamically, i.e. it should be a dumb method returning some sort of constant. *
* Implementation tips: - *
- * {@code - * @Override - * public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - * if (aTileEntity == null) return false; - * IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - * if (aMetaTileEntity == null) return false; - * if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - * if (((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier != 0) return false; // addition - * ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - * ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = getRecipeMap(); - * return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); - * } - * if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - * if (((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier != 0) return false; // addition - * ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - * ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = getRecipeMap(); - * return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); - * } - * return false; - * } - * }- * Example 2: Allow dynamo, muffler and prevent energy hatch - *
- * {@code - * @Override - * public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - * return addInputToMachineList(aTileEntity, aBaseCasingIndex) || - * addOutputToMachineList(aTileEntity, aBaseCasingIndex) || - * addDynamoToMachineList(aTileEntity, aBaseCasingIndex) || - * addMufflerToMachineList(aTileEntity, aBaseCasingIndex) || - * addMaintenanceToMachineList(aTileEntity, aBaseCasingIndex); - * } - * }