diff options
| author | Martin Robertz <dream-master@gmx.net> | 2022-01-30 09:57:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-30 09:57:25 +0100 |
| commit | 69834eef41c6cb12d69b1963603f7426e0736682 (patch) | |
| tree | 4b3e3887be059a2e3373a89e7aa8ffa996478a05 /src/main/java/gtPlusPlus/xmod/forestry/bees/handler | |
| parent | 8cc0619706f93b4e81fb930ec7fb85cdcbd5d734 (diff) | |
| parent | 1d983706ef427b1d008787843ac23529e43cc659 (diff) | |
| download | GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.gz GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.bz2 GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.zip | |
Merge pull request #102 from GTNewHorizons/St00f
St00f
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/forestry/bees/handler')
4 files changed, 224 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java new file mode 100644 index 0000000000..488ef2ea0b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java @@ -0,0 +1,57 @@ +package gtPlusPlus.xmod.forestry.bees.handler; + +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees; +import net.minecraft.item.ItemStack; + +public enum GTPP_CombType { + + DRAGONBLOOD(0, "Dragon Blood", true, 30, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20)), + FORCE(1, "Force", true, 30, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)); + + public boolean mShowInList; + public Material mMaterial; + public int mChance; + public int mID; + + private String mName; + private String mNameUnlocal; + private int[] mColour; + + private static void map(int aId, GTPP_CombType aType) { + GTPP_Bees.sCombMappings.put(aId, aType); + } + + public static GTPP_CombType get(int aID) { + return GTPP_Bees.sCombMappings.get(aID); + } + + GTPP_CombType(int aID, String aName, boolean aShow, int aChance, int... aColour) { + this.mID = aID; + this.mName = aName; + this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); + this.mChance = aChance; + this.mShowInList = aShow; + this.mColour = aColour; + map(aID, this); + this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); + } + + public void setHidden() { + this.mShowInList = false; + } + + public String getName() { + return GT_LanguageManager.addStringLocalization("comb." + this.mNameUnlocal, this.mName + " Comb"); + } + + public int[] getColours() { + return mColour == null || mColour.length != 2 ? new int[]{0, 0} : mColour; + } + + public ItemStack getStackForType(int count) { + return new ItemStack(GTPP_Bees.combs, count, mID); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java new file mode 100644 index 0000000000..60b8a18e48 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.forestry.bees.handler; + +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees; +import net.minecraft.item.ItemStack; + +public enum GTPP_DropType { + + DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20)), + FORCE(1, "Force", true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)); + + public boolean mShowInList; + public Material mMaterial; + public int mChance; + public int mID; + + private String mName; + private String mNameUnlocal; + private int[] mColour; + + private static void map(int aId, GTPP_DropType aType) { + GTPP_Bees.sDropMappings.put(aId, aType); + } + + public static GTPP_DropType get(int aID) { + return GTPP_Bees.sDropMappings.get(aID); + } + + private GTPP_DropType(int aID, String aName, boolean aShow, int... aColour) { + this.mID = aID; + this.mName = aName; + this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); + this.mShowInList = aShow; + this.mColour = aColour; + map(aID, this); + this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); + } + + public void setHidden() { + this.mShowInList = false; + } + + public String getName() { + return GT_LanguageManager.addStringLocalization("drop." + this.mNameUnlocal, this.mName + " Drop"); + } + + public int[] getColours() { + return mColour; + } + + public ItemStack getStackForType(int count) { + return new ItemStack(GTPP_Bees.drop, count, mID); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java new file mode 100644 index 0000000000..70dae45d06 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.forestry.bees.handler; + +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees; +import net.minecraft.item.ItemStack; + +public enum GTPP_PollenType { + + DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20)); + + public boolean mShowInList; + public Material mMaterial; + public int mChance; + public int mID; + + private String mName; + private String mNameUnlocal; + private int[] mColour; + + private static void map(int aId, GTPP_PollenType aType) { + GTPP_Bees.sPollenMappings.put(aId, aType); + } + + public static GTPP_PollenType get(int aID) { + return GTPP_Bees.sPollenMappings.get(aID); + } + + private GTPP_PollenType(int aID, String aName, boolean aShow, int... aColour) { + this.mID = aID; + this.mName = aName; + this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); + this.mShowInList = aShow; + this.mColour = aColour; + map(aID, this); + this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); + } + + public void setHidden() { + this.mShowInList = false; + } + + public String getName() { + return GT_LanguageManager.addStringLocalization("pollen." + this.mNameUnlocal, this.mName + " Pollen"); + } + + public int[] getColours() { + return mColour; + } + + public ItemStack getStackForType(int count) { + return new ItemStack(GTPP_Bees.pollen, count, mID); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java new file mode 100644 index 0000000000..20e4f31008 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.forestry.bees.handler; + +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees; +import net.minecraft.item.ItemStack; + +public enum GTPP_PropolisType { + + DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20)), + FORCE(1, "Force", true, Utils.rgbtoHexValue(250, 250, 20)); + + public boolean mShowInList; + public Material mMaterial; + public int mChance; + public int mID; + + private String mName; + private String mNameUnlocal; + private int mColour; + + private static void map(int aId, GTPP_PropolisType aType) { + GTPP_Bees.sPropolisMappings.put(aId, aType); + } + + public static GTPP_PropolisType get(int aID) { + return GTPP_Bees.sPropolisMappings.get(aID); + } + + private GTPP_PropolisType(int aID, String aName, boolean aShow, int aColour) { + this.mID = aID; + this.mName = aName; + this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", ""); + this.mShowInList = aShow; + this.mColour = aColour; + map(aID, this); + this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", "")); + } + + public void setHidden() { + this.mShowInList = false; + } + + public String getName() { + return GT_LanguageManager.addStringLocalization("propolis." + this.mNameUnlocal, this.mName + " Propolis"); + } + + public int getColours() { + return mColour; + } + + public ItemStack getStackForType(int count) { + return new ItemStack(GTPP_Bees.propolis, count, mID); + } +} |
