diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-09 21:03:31 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-09 21:03:31 +0000 |
commit | 051c46ab36a749954cff3bae1fbd44cea6f1fc99 (patch) | |
tree | baad2cc9886c5f0b7bf3a381c7002af9fe3ac80e /src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java | |
parent | e49fbd1330c0875ff531ff25119afe15b54c9448 (diff) | |
download | GT5-Unofficial-051c46ab36a749954cff3bae1fbd44cea6f1fc99.tar.gz GT5-Unofficial-051c46ab36a749954cff3bae1fbd44cea6f1fc99.tar.bz2 GT5-Unofficial-051c46ab36a749954cff3bae1fbd44cea6f1fc99.zip |
+ Added GT++ API class.
+ Added handler for Void Miner to API.
+ Added handler for special multiblock logic to API.
+ Added Initial work For Chemical Plant.
% More work on the Algae Farm.
Diffstat (limited to 'src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java')
-rw-r--r-- | src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java b/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java new file mode 100644 index 0000000000..e562ccc40b --- /dev/null +++ b/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java @@ -0,0 +1,44 @@ +package gtPlusPlus.api.objects.minecraft.multi; + +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +/** + * Extend this class to implement custom behaviour for multiblocks. + * The Trigger item when in a special slot or input bus, will cause the multiblock to behave as specified. + * Not overriding a method here will cause the default values to be used. + * @author Alkalus + * + */ +public abstract class SpecialMultiBehaviour { + + private final int mMaxParallelRecipes = Short.MIN_VALUE; + private final int mEUPercent = Short.MIN_VALUE; + private final int mSpeedBonusPercent = Short.MIN_VALUE; + private final int mOutputChanceRoll = Short.MIN_VALUE; + + public abstract ItemStack getTriggerItem(); + + public abstract String getTriggerItemTooltip(); + + public int getMaxParallelRecipes() { + return this.mMaxParallelRecipes; + } + + public int getEUPercent() { + return this.mEUPercent; + } + + public int getSpeedBonusPercent() { + return this.mSpeedBonusPercent; + } + + public int getOutputChanceRoll() { + return this.mOutputChanceRoll; + } + + public final boolean isTriggerItem(ItemStack aToMatch) { + return GT_Utility.areStacksEqual(getTriggerItem(), aToMatch, false); + } + +} |