diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-30 02:18:50 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-30 02:18:50 +0000 |
commit | 7832b6223896af1b1435cdfeb52ce0210bfd2203 (patch) | |
tree | 495a4e090f0bfadbb31e3718e50e2fc7ae5e0230 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base | |
parent | 222fbc044f89a2d272f0bace58c28db1e6927e0f (diff) | |
download | GT5-Unofficial-7832b6223896af1b1435cdfeb52ce0210bfd2203.tar.gz GT5-Unofficial-7832b6223896af1b1435cdfeb52ce0210bfd2203.tar.bz2 GT5-Unofficial-7832b6223896af1b1435cdfeb52ce0210bfd2203.zip |
$ Fixed 'bug' where GT wooden Pipes/Frames would require an Axe to harvest. They now require a wrench, freeing up 4 MetaIDs on BlockMachines for myself to use.
$ Fixed handling of custom BaseMetaTileEntity implementations. Meta 12-15 is now used by GT++ to deploy custom without requiring any outside items or blocks.
$ Fixed IC2 items requiring a pickaxe to mine and shitty wrench handling. You can now just mine them as usual with a wrench.
$ Fixed ALL GT/GT++ Tile Entity Tooltips. Formatted some things slighty, added additional information and additional custom tooltip support.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base')
6 files changed, 42 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java index 1920b4a282..422837fa46 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java @@ -1,18 +1,20 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import java.util.Locale; + import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import net.minecraft.item.ItemStack; public abstract class CustomMetaTileBase extends MetaTileEntity { - private IGregTechTileEntity mBaseMetaTileEntity; public CustomMetaTileBase(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { super(aID, aBasicName, aRegionalName, aInvSlotCount); - this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntity()); - this.getBaseMetaTileEntity().setMetaTileID((short) aID); + GT_LanguageManager.addStringLocalization("gtpp.blockmachines." + aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH) + ".name", aRegionalName); + this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntity()); + this.getBaseMetaTileEntity().setMetaTileID((short) aID); } public CustomMetaTileBase(String aName, int aInvSlotCount) { @@ -24,7 +26,35 @@ public abstract class CustomMetaTileBase extends MetaTileEntity { } public String getLocalName() { - return GT_LanguageManager.getTranslation("gt.blockmachines." + this.mName + ".name"); + return GT_LanguageManager.getTranslation("gtpp.blockmachines." + this.mName + ".name"); + } + + /** + * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. + * <p/> + * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantlee + * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle + * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle + * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle + * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle + * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle + * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle + * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle + * + * == Reserved for Alk now + * + * 12 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 13 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + * 14 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 15 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + */ + @Override + public byte getTileEntityBaseType() { + return 12; } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java index 4140617fcf..c9201471a4 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java @@ -63,7 +63,7 @@ public abstract class GregtechMetaTileEntity extends MetaTileEntity { @Override public String[] getDescription() { - return new String[] { this.mDescription, CORE.GT_Tooltip }; + return new String[] { this.mDescription }; } /** diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java index df7e8cf373..ccf31673e7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java @@ -85,7 +85,7 @@ public class GregtechMetaTransformerHiAmp extends GT_MetaTileEntity_Transformer @Override public String[] getDescription() { - return new String[] { this.mDescription, "Accepts 4A and outputs 16A", CORE.GT_Tooltip }; + return new String[] { this.mDescription, "Accepts 4A and outputs 16A"}; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 3e5c783a5c..41ba313b0e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -295,15 +295,13 @@ GT_MetaTileEntity_MultiBlockBase { aRequiresCoreModule, aRequiresMuffler, getPollutionTooltip(), - getMachineTooltip(), - CORE.GT_Tooltip}; + getMachineTooltip()}; } else { z = new String[] { aRequiresMaint, aRequiresCoreModule, - getMachineTooltip(), - CORE.GT_Tooltip}; + getMachineTooltip(),}; } int a2, a3; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java index f6dc8547cc..287d2105ac 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java @@ -58,7 +58,7 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_ @Override public String[] getDescription() { - return new String[]{this.mDescription, "Fuel Efficiency: " + this.getEfficiency() + "%", CORE.GT_Tooltip}; + return new String[]{this.mDescription, "Fuel Efficiency: " + this.getEfficiency() + "%"}; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java index c1915fb14a..a88d6a4832 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -65,13 +65,11 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ return new String[]{ this.mDescription, "Fuel Efficiency: " + this.getEfficiency()*2 + "%", - aPollution, - CORE.GT_Tooltip}; + aPollution}; } return new String[]{ this.mDescription, - "Fuel Efficiency: " + this.getEfficiency()*2 + "%", - CORE.GT_Tooltip}; + "Fuel Efficiency: " + this.getEfficiency()*2 + "%"}; } |