diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-10 11:01:32 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-10 11:01:32 +0000 |
commit | 2525ff075586759657e89b9f01969f0596bca2df (patch) | |
tree | a492c6396f067e2c1e7feb2dd79b01b0c5c3c8df /src/Java/gtPlusPlus/xmod/gregtech | |
parent | 051c46ab36a749954cff3bae1fbd44cea6f1fc99 (diff) | |
download | GT5-Unofficial-2525ff075586759657e89b9f01969f0596bca2df.tar.gz GT5-Unofficial-2525ff075586759657e89b9f01969f0596bca2df.tar.bz2 GT5-Unofficial-2525ff075586759657e89b9f01969f0596bca2df.zip |
% Changed name of custom GT++ Programmed Circuit to Programmed Bio Circuit.
$ Fixed getNumberedBioCircuit() in CI.
$ Fixed an issue where stripped fields were referenced in server side bytecode.
$ Fixed Tooltips not working as intended for items giving custom GT++ Multi behaviour.
$ Fixed 'No Bonus Output Chance' item not registering correctly.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
4 files changed, 22 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index 42354e49e1..fd4659c543 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -19,9 +19,11 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.helpers.GregtechPlusPlus_API.Multiblock_API; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.minecraft.multi.NoOutputBonusMultiBehaviour; import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia; import gtPlusPlus.core.handler.COMPAT_HANDLER; import gtPlusPlus.core.handler.OldCircuitHandler; @@ -123,6 +125,9 @@ public class HANDLER_GT { } + // Register the No-Bonus Special Behaviour. + Multiblock_API.registerSpecialMultiBehaviour(new NoOutputBonusMultiBehaviour()); + //Register some custom recipe maps for any enabled multiblocks. //MultiblockRecipeMapHandler.run(); } 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 89c1112726..55378113d9 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 @@ -100,12 +100,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult try { calculatePollutionReduction = GT_MetaTileEntity_Hatch_Muffler.class.getDeclaredMethod("calculatePollutionReduction", int.class); - } catch (NoSuchMethodException | SecurityException e) {} - - - // Register the No-Bonus Special Behaviour. - new NoOutputBonusMultiBehaviour(); - + } catch (NoSuchMethodException | SecurityException e) {} } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java index f345a67db6..74655fb744 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java @@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.api.util; import java.util.HashMap; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; public class SpecialBehaviourTooltipHandler { @@ -18,9 +20,13 @@ public class SpecialBehaviourTooltipHandler { public void onItemTooltip(ItemTooltipEvent event){ if (event != null) { if (event.itemStack != null) { - String s = mTooltipCache.get(event.itemStack); - if (s != null && s.length() > 0) { - event.toolTip.add(s); + for (ItemStack aKey : mTooltipCache.keySet()) { + if (GT_Utility.areStacksEqual(aKey, event.itemStack, false)) { + String s = mTooltipCache.get(aKey); + if (s != null && s.length() > 0) { + event.toolTip.add(EnumChatFormatting.RED+s); + } + } } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index 38c80ce8c4..81afe2b147 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -564,10 +564,15 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase { return tRecipe; } - private static WeightedCollection<ItemStack> generateWeightedCollection(){ + private static ItemStack[] getOutputForTier(int aTier){ + ItemStack[] aOutputs = new ItemStack[16]; + + + + WeightedCollection<ItemStack> aCollection = new WeightedCollection<ItemStack>(); - return aCollection; + return aOutputs; } |