aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-23 17:41:06 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-23 17:41:06 +0000
commit43be31d2ac5c8d390579edd4faa5817e91fc4b1a (patch)
tree00ad2ecf627fd461e88e4e3067877c93ef4f0909 /src/main/java/gtPlusPlus/xmod
parent0af6401544c94989f3913c9ea6638a304f7596ef (diff)
downloadGT5-Unofficial-43be31d2ac5c8d390579edd4faa5817e91fc4b1a.tar.gz
GT5-Unofficial-43be31d2ac5c8d390579edd4faa5817e91fc4b1a.tar.bz2
GT5-Unofficial-43be31d2ac5c8d390579edd4faa5817e91fc4b1a.zip
Added framework for custom bees.
Boosted drops of Dragon Metal from Chaos Dragons. Fixed https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/9556.
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java230
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java62
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java67
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java65
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java550
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java36
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java40
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java191
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java80
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java37
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java82
16 files changed, 523 insertions, 1000 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
index c395825b33..7f372837a5 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
@@ -22,13 +22,13 @@ public class HANDLER_FR {
public static void Init(){
if (LoadedMods.Forestry){
- new GTPP_Bees();
}
}
public static void postInit(){
if (LoadedMods.Forestry){
FR_Gregtech_Recipes.registerItems();
+ new GTPP_Bees();
}
}
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
index bc9fb7bcdc..b3f12bc9d5 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java
@@ -2,193 +2,51 @@ package gtPlusPlus.xmod.forestry.bees.handler;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
public enum GTPP_CombType {
- //Organic Line
- LIGNIE("lignite", true, Materials.Lignite, 100,0x58300B, 0x906237),
- COAL("coal", true, Materials.Coal, 100,0x525252, 0x666666),
- STICKY("stickyresin", true, Materials._NULL, 50,0x2E8F5B, 0xDCC289),
- OIL("oil", true, Materials._NULL, 100,0x333333, 0x4C4C4C),
- APATITE("apatite", true, Materials.Apatite, 100,0xc1c1f6, 0x676784),
- ASH("ash", true, Materials.Ash, 100,0x1e1a18, 0xc6c6c6),
- //IC2 Line
- COOLANT("coolant", true, Materials._NULL, 100,0x144F5A, 0x2494A2),
- ENERGY("energy", true, Materials._NULL, 80,0xC11F1F, 0xEBB9B9),
- LAPOTRON("lapotron", true, Materials._NULL, 60,0x1414FF, 0x6478FF),
- PYROTHEUM("pyrotheum", true, Materials.Pyrotheum, 50,0xffebc4, 0xe36400),
- CRYOTHEUM("cryotheum", true, Materials.Pyrotheum, 50,0x2660ff, 0x5af7ff),
-
- //Alloy Line
- REDALLOY("redalloy", true, Materials.RedAlloy, 100,0xE60000, 0xB80000),
- REDSTONEALLOY("redstonealloy", true, Materials.RedstoneAlloy, 90,0xB80000, 0xA50808),
- CONDUCTIVEIRON("conductiveiron", true, Materials.ConductiveIron, 80,0x817671, 0xCEADA3),
- VIBRANTALLOY("vibrantalloy", true, Materials.VibrantAlloy, 50,0x86A12D, 0xC4F2AE),
- ENERGETICALLOY("energeticalloy", true, Materials.EnergeticAlloy, 70,0xFF9933, 0xFFAD5C),
- ELECTRICALSTEEL("electricalsteel", true, Materials.ElectricalSteel, 90,0x787878, 0xD8D8D8),
- DARKSTEEL("darksteel", true, Materials.DarkSteel, 80,0x252525, 0x443B44),
- PULSATINGIRON("pulsatingiron", true, Materials.PulsatingIron, 80,0x006600, 0x6DD284),
- STAINLESSSTEEL("stainlesssteel", true, Materials.StainlessSteel, 75,0x778899, 0xC8C8DC),
- ENDERIUM("enderium", true, Materials.Enderium, 40,0x2E8B57, 0x599087),
-
- //Thaumcraft Line
- THAUMIUMDUST("thaumiumdust", true, Materials.Thaumium, 100,0x7A007A, 0x5C005C),
- THAUMIUMSHARD("thaumiumshard", true, Materials._NULL, 85,0x9966FF, 0xAD85FF),
- AMBER("amber", true, Materials.Amber, 90,0x774B15, 0xEE7700),
- QUICKSILVER("quicksilver", true, Materials.Mercury, 90,0xc7c7ea, 0xb5b3df),
- SALISMUNDUS("salismundus", true, Materials._NULL, 75,0xF7ADDE, 0x592582),
- TAINTED("tainted", true, Materials._NULL, 80,0x904BB8, 0xE800FF),
- MITHRIL("mithril", true, Materials.Mithril, 70,0xF0E68C, 0xFFFFD2),
- ASTRALSILVER("astralsilver", true, Materials.AstralSilver, 70,0xAFEEEE, 0xE6E6FF),
- THAUMINITE("thauminite", true, Materials._NULL, 50,0x2E2D79, 0x7581E0),
- SHADOWMETAL("shadowmetal", true, Materials.Shadow, 50,0x100322, 0x100342),
- DIVIDED("divided", true, Materials.Unstable, 40,0xF0F0F0, 0xDCDCDC),
- SPARKELING("sparkling", true, Materials.NetherStar, 40,0x7A007A, 0xFFFFFF),
-
- //Gem Line
- STONE("stone", true, Materials._NULL, 70,0x808080, 0x999999),
- CERTUS("certus", true, Materials.CertusQuartz, 100,0x57CFFB, 0xBBEEFF),
- FLUIX("fluix", true, Materials.Fluix, 100,0xA375FF, 0xB591FF),
- REDSTONE("redstone", true, Materials.Redstone, 100,0x7D0F0F, 0xD11919),
- RAREEARTH("rareearth", true, Materials.RareEarth, 100,0x555643, 0x343428),
- LAPIS("lapis", true, Materials.Lapis, 100,0x1947D1, 0x476CDA),
- RUBY("ruby", true, Materials.Ruby, 100,0xE6005C, 0xCC0052),
- REDGARNET("redgarnet", true, Materials.GarnetRed,100,0xBD4C4C, 0xECCECE),
- YELLOWGARNET("yellowgarnet", true, Materials.GarnetYellow,100,0xA3A341, 0xEDEDCE),
- SAPPHIRE("sapphire", true, Materials.Sapphire, 100,0x0033CC, 0x00248F),
- DIAMOND("diamond", true, Materials.Diamond, 100,0xCCFFFF, 0xA3CCCC),
- OLIVINE("olivine", true, Materials.Olivine, 100,0x248F24, 0xCCFFCC),
- EMERALD("emerald", true, Materials.Emerald, 100,0x248F24, 0x2EB82E),
- PYROPE("pyrope", true, Materials.Pyrope, 100,0x763162, 0x8B8B8B),
- GROSSULAR("grossular", true, Materials.Grossular, 100,0x9B4E00, 0x8B8B8B),
- FIRESTONE("firestone", true, Materials.Firestone, 100,0xC00000, 0xFF0000),
-
- //Metals Line
- SLAG("slag", true, Materials._NULL, 50,0xD4D4D4, 0x58300B),
- COPPER("copper", true, Materials.Copper, 100,0xFF6600, 0xE65C00),
- TIN("tin", true, Materials.Tin, 100,0xD4D4D4, 0xDDDDDD),
- LEAD("lead", true, Materials.Lead, 100,0x666699, 0xA3A3CC),
- IRON("iron", true, Materials.Iron, 100,0xDA9147, 0xDE9C59),
- STEEL("steel", true, Materials.Steel, 95,0x808080, 0x999999),
- NICKEL("nickel", true, Materials.Nickel, 100,0x8585AD, 0x9D9DBD),
- ZINC("zinc", true, Materials.Zinc, 100,0xF0DEF0, 0xF2E1F2),
- SILVER("silver", true, Materials.Silver, 100,0xC2C2D6, 0xCECEDE),
- GOLD("gold", true, Materials.Gold, 100,0xE6B800, 0xCFA600),
- SULFUR("sulfur", true, Materials.Sulfur, 100,0x6F6F01, 0x8B8B8B),
- GALLIUM ("gallium", true, Materials.Gallium, 75,0x8B8B8B, 0xC5C5E4),
- ARSENIC ("arsenic", true, Materials.Arsenic, 75,0x736C52, 0x292412),
-
- //Rare Metals Line
- BAUXITE("bauxite", true, Materials.Bauxite, 85,0x6B3600, 0x8B8B8B),
- ALUMINIUM("aluminium", true, Materials.Aluminium, 60,0x008AB8, 0xD6D6FF),
- MANGANESE("manganese", true, Materials.Manganese, 30,0xD5D5D5, 0xAAAAAA),
- MAGNESIUM("magnesium", true, Materials.Magnesium, 75,0xF1D9D9, 0x8B8B8B),
- TITANIUM("titanium", true, Materials.Ilmenite, 100,0xCC99FF, 0xDBB8FF),
- CHROME("chromium", true, Materials.Chrome, 50,0xEBA1EB, 0xF2C3F2),
- TUNGSTEN("tungsten", true, Materials.Tungstate, 100,0x62626D, 0x161620),
- PLATINUM("platinum", true, Materials.Platinum, 40,0xE6E6E6, 0xFFFFCC),
- IRIDIUM("iridium", true, Materials.Iridium, 20,0xDADADA, 0xD1D1E0),
- MOLYBDENUM("molybdenum", true, Materials.Molybdenum, 20,0xAEAED4, 0x8B8B8B),
- OSMIUM("osmium", true, Materials.Osmium, 15,0x2B2BDA, 0x8B8B8B),
- LITHIUM("lithium", true, Materials.Lithium, 75,0xF0328C, 0xE1DCFF),
- SALT("salt", true, Materials.Salt, 90,0xF0C8C8, 0xFAFAFA),
- ELECTROTINE("electrotine", true, Materials.Electrotine, 75,0x1E90FF, 0x3CB4C8),
- ALMANDINE("almandine", true, Materials.Almandine, 85,0xC60000, 0x8B8B8B),
-
- //Radioactive Line
- URANIUM("uranium", true, Materials.Uranium, 50,0x19AF19, 0x169E16),
- PLUTONIUM("plutonium", true, Materials.Plutonium, 10,0x240000, 0x570000),
- NAQUADAH("naquadah", true, Materials.Naquadah, 10,0x000000, 0x004400),
- NAQUADRIA("naquadria", true, Materials.Naquadria, 5,0x000000, 0x002400),
- DOB("d-o-b", true, Materials._NULL, 50,0x007700, 0x002400),
- THORIUM("thorium", true, Materials.Thorium, 75,0x001E00, 0x005000),
- LUTETIUM("lutetium", true, Materials.Lutetium, 10,0xE6FFE6, 0xFFFFFF),
- AMERICIUM("americium", true, Materials.Americium, 5,0xE6E6FF, 0xC8C8C8),
- NEUTRONIUM("neutronium", true, Materials.Neutronium, 2,0xFFF0F0, 0xFAFAFA),
-
- //Twilight
- NAGA("naga", true, Materials._NULL, 100,0x0D5A0D, 0x28874B),
- LICH("lich", true, Materials._NULL, 90,0x5C605E, 0xC5C5C5),
- HYDRA("hydra", true, Materials._NULL, 80,0x872836, 0xB8132C),
- URGHAST("urghast", true, Materials._NULL, 70,0x7C0618, 0xA7041C),
- SNOWQUEEN("snowqueen", true, Materials._NULL, 60,0x9C0018, 0xD02001),
-
- //Space
- SPACE("space", true, Materials._NULL, 100,0x003366, 0xC0C0C0),
- METEORICIRON("meteoriciron",true, Materials.MeteoricIron, 100,0x321928, 0x643250),
- DESH("desh",true, Materials.Desh, 90,0x282828, 0x323232),
- LEDOX("ledox",true, Materials.Ledox, 75,0x0000CD, 0x0074FF),
- CALLISTOICE("callistoice",true, Materials.CallistoIce, 75,0x0074FF, 0x1EB1FF),
- MYTRYL("mytryl",true, Materials.Mytryl, 65,0xDAA520, 0xF26404),
- QUANTIUM("quantium",true, Materials.Quantium, 50,0x00FF00, 0x00D10B),
- ORIHARUKON("oriharukon",true, Materials.Oriharukon, 50,0x228B22, 0x677D68),
- MYSTERIOUSCRYSTAL("mysteriouscrystal",true, Materials.MysteriousCrystal, 45,0x3CB371, 0x16856C),
- BLACKPLUTONIUM("blackplutonium",true, Materials.Quantium, 25,0x000000, 0x323232),
- TRINIUM("trinium",true, Materials.Trinium, 25,0xB0E0E6, 0xC8C8D2),
-
- //Planet
- MERCURY("mercury", true, Materials._NULL, 65,0x4A4033, 0xB5A288),
- VENUS("venus",true, Materials._NULL, 65,0x120E07, 0x272010),
- MOON("moon",true, Materials._NULL, 90,0x373735, 0x7E7E78),
- MARS("mars",true, Materials._NULL, 80,0x220D05, 0x3A1505),
- JUPITER("jupiter",true, Materials._NULL, 75,0x734B2E, 0xD0CBC4),
- SATURN("saturn",true, Materials._NULL, 55,0xD2A472, 0xF8C37B),
- URANUS("uranus",true, Materials._NULL, 45,0x75C0C9, 0x84D8EC),
- NEPTUN("neptun",true, Materials._NULL, 35,0x334CFF, 0x576DFF),
- PLUTO("pluto",true, Materials._NULL, 25,0x34271E, 0x69503D),
- HAUMEA("haumea",true, Materials._NULL, 20,0x1C1413, 0x392B28),
- MAKEMAKE("makemake",true, Materials._NULL, 20,0x301811, 0x120A07),
- CENTAURI("centauri",true, Materials._NULL, 15,0x2F2A14, 0xB06B32),
- TCETI("tceti",true, Materials._NULL, 10,0x46241A, 0x7B412F),
- BARNARDA("barnarda",true, Materials._NULL, 10,0x0D5A0D, 0xE6C18D),
- VEGA("vega",true, Materials._NULL, 10,0x1A2036, 0xB5C0DE),
-
- //Infinity
- COSMICNEUTRONIUM("cosmicneutronium",true, Materials._NULL, 5,0x484848, 0x323232),
- INFINITYCATALYST("infinitycatalyst",true, Materials._NULL, 2,0xFFFFFF, 0xFFFFFF),
- INFINITY("infinity",true, Materials._NULL, 1,0xFFFFFF, 0xFFFFFF),
-
- //HEE
- ENDDUST("enddust", true, Materials._NULL, 50,0x003A7D, 0xCC00FA),
- ECTOPLASMA("ectoplasma", true, Materials._NULL, 35,0x381C40, 0xDCB0E5),
- ARCANESHARD("arcaneshard", true, Materials._NULL, 35,0x333D82, 0x9010AD),
- STARDUST("stardust", true, Materials._NULL, 60,0xDCBE13, 0xffff00),
- DRAGONESSENCE("dragonessence", true, Materials._NULL, 30,0x911ECE, 0xFFA12B),
- ENDERMAN("enderman", true, Materials._NULL, 25,0x6200e7, 0x161616),
- SILVERFISH("silverfish", true, Materials._NULL, 25,0x0000000, 0xEE053D),
- ENDIUM("endium", true, Materials.HeeEndium, 50,0x2F5A6C, 0xa0ffff),
- RUNEI("rune1", true, Materials._NULL, 10,0x0104D9, 0xE31010),
- RUNEII("rune2", true, Materials._NULL, 10,0xE31010, 0x0104D9),
- FIREESSENSE("fireessence", true, Materials._NULL, 30,0xFFA157, 0xD41238),
-
- //New Combs to avoid meta id issues
- CRYOLITE("cryolite", true, Materials.Cryolite, 90, 0xBFEFFF, 0x73B9D0);
-
- public boolean showInList;
- public Materials material;
- public int chance;
-
- private String name;
- private int[] color;
-
- GTPP_CombType(String pName, boolean show, Materials material, int chance, int... color) {
- this.name = pName;
- this.material = material;
- this.chance = chance;
- this.showInList = show;
- this.color=color;
- }
-
- public void setHidden() {
- this.showInList = false;
- }
-
- public String getName() {
-
- return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb");
- }
-
- public int[] getColours() {
- return color == null || color.length != 2 ? new int[]{0,0} : color;
- }
+ DRAGONBLOOD(0, "Dragon Blood", true, Materials._NULL, 30, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20)),
+ FORCE(1, "Force", true, Materials.Force, 30, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5));
+
+ public boolean mShowInList;
+ public Materials 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, Materials aMaterial, int aChance, int... aColour) {
+ this.mID = aID;
+ this.mName = aName;
+ this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", "");
+ this.mMaterial = aMaterial;
+ this.mChance = aChance;
+ this.mShowInList = aShow;
+ this.mColour = aColour;
+ map(aID, this);
+ }
+
+ 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;
+ }
}
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
index 8578baa3c3..70333fdf2d 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java
@@ -2,50 +2,48 @@ package gtPlusPlus.xmod.forestry.bees.handler;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
public enum GTPP_DropType {
- OIL("oil",true),
- MUTAGEN("small mutagen catalyst",true),
- COOLANT("coolant",true),
- HOT_COOLANT("hot coolant",true),
- HYDRA("hydra blood",true),
- SNOW_QUEEN("snowqueen blood",true),
- OXYGEN("oxygen",true),
- LAPIS("lapis coolant",true),
- ENDERGOO("ender goo",true);
-
- private static int[][] colours = new int[][]{
- {0x19191B, 0x303032},
- {0xffc100, 0x00ff11},
- {0x144F5A, 0x2494A2},
- {0xC11F1F, 0xEBB9B9},
- {0x872836, 0xB8132C},
- {0xD02001, 0x9C0018},
- {0x003366, 0x0066BB},
- {0x1727b1, 0x008ce3},
- {0xA005E7, 0x161616},
- };
- public boolean showInList;
- public Materials material;
- public int chance;
- private String name;
+ DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20));
- private GTPP_DropType(String pName, boolean show) {
- this.name = pName;
- this.showInList = show;
+ public boolean mShowInList;
+ public Materials 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);
}
public void setHidden() {
- this.showInList = false;
+ this.mShowInList = false;
}
public String getName() {
-
- return GT_LanguageManager.addStringLocalization("drop." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Drop");
+ return GT_LanguageManager.addStringLocalization("drop." + this.mNameUnlocal, this.mName + " Drop");
}
public int[] getColours() {
- return colours[this.ordinal()];
+ return mColour;
}
}
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
index 7010c45cd0..cf0543ebf1 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java
@@ -2,33 +2,48 @@ package gtPlusPlus.xmod.forestry.bees.handler;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
public enum GTPP_PollenType {
- MATRIX("matrix",true);
-
- private static int[][] colours = new int[][]{
- {0x19191B, 0x303032},
- };
- public boolean showInList;
- public Materials material;
- public int chance;
- private String name;
-
- private GTPP_PollenType(String pName, boolean show) {
- this.name = pName;
- this.showInList = show;
- }
-
- public void setHidden() {
- this.showInList = false;
- }
-
- public String getName() {
- return GT_LanguageManager.addStringLocalization("pollen." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Pollen");
- }
-
- public int[] getColours() {
- return colours[this.ordinal()];
- }
+ DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20));
+
+ public boolean mShowInList;
+ public Materials 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);
+ }
+
+ public void setHidden() {
+ this.mShowInList = false;
+ }
+
+ public String getName() {
+ return GT_LanguageManager.addStringLocalization("pollen." + this.mNameUnlocal, this.mName + " Pollen");
+ }
+
+ public int[] getColours() {
+ return mColour;
+ }
}
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
index 92ee16571d..a989b4d9cb 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java
@@ -2,51 +2,48 @@ package gtPlusPlus.xmod.forestry.bees.handler;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
public enum GTPP_PropolisType {
- End("End",true),
- Ectoplasma("Ectoplasma",true),
- Arcaneshard("Arcaneshard",true),
- Stardust("Stardust",true),
- Dragonessence("Dragonessence",true),
- Enderman("Enderman",true),
- Silverfish("Silverfish", true),
- Endium("Endium", true),
- Fireessence("Fireessence",true);
-
- private static int[] colours = new int[]{
- 0xCC00FA,
- 0xDCB0E5,
- 0x9010AD,
- 0xFFFF00,
- 0x911ECE,
- 0x161616,
- 0xEE053D,
- 0xa0ffff,
- 0xD41238
- };
-
- public boolean showInList;
- public Materials material;
- public int chance;
- private String name;
-
- private GTPP_PropolisType(String pName, boolean show) {
- this.name = pName;
- this.showInList = show;
+ DRAGONBLOOD(0, "Dragon Blood", true, Utils.rgbtoHexValue(220, 20, 20));
+
+ public boolean mShowInList;
+ public Materials 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);
}
public void setHidden() {
- this.showInList = false;
+ this.mShowInList = false;
}
public String getName() {
-// return "gt.comb."+this.name;
- return GT_LanguageManager.addStringLocalization("propolis." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Propolis");
+ return GT_LanguageManager.addStringLocalization("propolis." + this.mNameUnlocal, this.mName + " Propolis");
}
public int getColours() {
- return colours[this.ordinal()];
+ return mColour;
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java
deleted file mode 100644
index 7d9a9e231b..0000000000
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package gtPlusPlus.xmod.forestry.bees.items;
-
-public class FR_CustomBee {
-
-}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java
index 01e7009cb8..f191cc4ae1 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java
@@ -1,6 +1,10 @@
package gtPlusPlus.xmod.forestry.bees.items.output;
-import static gregtech.api.enums.GT_Values.*;
+import static gregtech.api.enums.GT_Values.L;
+import static gregtech.api.enums.GT_Values.NF;
+import static gregtech.api.enums.GT_Values.NI;
+import static gregtech.api.enums.GT_Values.RA;
+import static gregtech.api.enums.GT_Values.V;
import java.util.Arrays;
import java.util.List;
@@ -14,15 +18,19 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.api.recipes.RecipeManagers;
import gregtech.GT_Mod;
-import gregtech.api.enums.*;
-import gregtech.api.util.*;
-import gregtech.loaders.materialprocessing.ProcessingModSupport;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.xmod.forestry.bees.handler.*;
+import gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType;
+import gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType;
+import gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType;
import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -30,7 +38,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
public class GTPP_Comb extends Item {
-
+
@SideOnly(Side.CLIENT)
private IIcon secondIcon;
@@ -43,18 +51,18 @@ public class GTPP_Comb extends Item {
}
public ItemStack getStackForType(GTPP_CombType type) {
- return new ItemStack(this, 1, type.ordinal());
+ return new ItemStack(this, 1, type.mID);
}
public ItemStack getStackForType(GTPP_CombType type, int count) {
- return new ItemStack(this, count, type.ordinal());
+ return new ItemStack(this, count, type.mID);
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, List list) {
for (GTPP_CombType type : GTPP_CombType.values()) {
- if (type.showInList) {
+ if (type.mShowInList) {
list.add(this.getStackForType(type));
}
}
@@ -72,7 +80,7 @@ public class GTPP_Comb extends Item {
}
@Override
- @SideOnly(Side.CLIENT)
+ @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister) {
this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
@@ -86,11 +94,10 @@ public class GTPP_Comb extends Item {
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass) {
- int meta = Math.max(0, Math.min(GTPP_CombType.values().length - 1, stack.getItemDamage()));
- int colour = GTPP_CombType.values()[meta].getColours()[0];
+ int colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[0];
if (pass >= 1) {
- colour = GTPP_CombType.values()[meta].getColours()[1];
+ colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[1];
}
return colour;
@@ -98,470 +105,221 @@ public class GTPP_Comb extends Item {
@Override
public String getItemStackDisplayName(ItemStack stack) {
- return GTPP_CombType.values()[stack.getItemDamage()].getName();
+ return GTPP_CombType.get(stack.getItemDamage()).getName();
}
- public void initCombsRecipes() {
-
- //Organic
- addProcessGT(GTPP_CombType.LIGNIE, new Materials[] {Materials.Lignite}, Voltage.LV);
- addProcessGT(GTPP_CombType.COAL, new Materials[] {Materials.Coal}, Voltage.LV);
- addCentrifugeToItemStack(GTPP_CombType.STICKY, new ItemStack[] { ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1) }, new int[] {50 * 100, 15 * 100, 50 * 100}, Voltage.ULV);
- addProcessGT(GTPP_CombType.OIL, new Materials[] {Materials.Oilsands}, Voltage.LV);
- addProcessGT(GTPP_CombType.APATITE, new Materials[] {Materials.Apatite, Materials.Phosphate}, Voltage.LV);
- addCentrifugeToMaterial(GTPP_CombType.ASH, new Materials[] {Materials.DarkAsh, Materials.Ash}, new int[] { 50*100, 50*100}, new int[] {}, Voltage.ULV, NI, 50 * 100);
- if(GT_Mod.gregtechproxy.mNerfedCombs) {
- addCentrifugeToItemStack(GTPP_CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 50 * 100}, Voltage.ULV);
- addCentrifugeToItemStack(GTPP_CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 50 * 100}, Voltage.ULV);
- addCentrifugeToItemStack(GTPP_CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(1), GTPP_Bees.drop.getStackForType(GTPP_DropType.OIL), ItemList.FR_Wax.get(1) }, new int[] {70 * 100, 100 * 100, 50 * 100}, Voltage.ULV);
- }else {
- addCentrifugeToItemStack(GTPP_CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 100 * 100, 50 * 100}, Voltage.ULV);
- addCentrifugeToItemStack(GTPP_CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 100 * 100, 50 * 100}, Voltage.ULV);
- addCentrifugeToItemStack(GTPP_CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(1), GTPP_Bees.drop.getStackForType(GTPP_DropType.OIL), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), ItemList.FR_Wax.get(1) }, new int[] {70 * 100, 100 * 100, 100 * 100, 50 * 100}, Voltage.ULV);
- addCentrifugeToMaterial(GTPP_CombType.APATITE, new Materials[] { Materials.Apatite, Materials.Phosphate }, new int[] {100 * 100, 80 * 100 }, new int[] {}, Voltage.ULV, NI, 30 * 100);
- }
-
- //ic2
- addCentrifugeToItemStack(GTPP_CombType.COOLANT, new ItemStack[] { GTPP_Bees.drop.getStackForType(GTPP_DropType.COOLANT), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100}, Voltage.HV, 196);
- addCentrifugeToItemStack(GTPP_CombType.ENERGY, new ItemStack[] {GTPP_Bees.drop.getStackForType(GTPP_DropType.HOT_COOLANT), ItemList.IC2_Energium_Dust.get(1L), ItemList.FR_RefractoryWax.get(1)}, new int[] {20 * 100, 20 * 100, 50 * 100}, Voltage.HV, 196);
- addCentrifugeToItemStack(GTPP_CombType.LAPOTRON, new ItemStack[] {GTPP_Bees.drop.getStackForType(GTPP_DropType.LAPIS), GT_ModHandler.getModItem(MOD_ID_DC, "item.LapotronDust", 1, 0), GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) }, new int[] {20 * 100, 15 * 100, 40 * 100}, Voltage.HV, 196);
- addCentrifugeToMaterial(GTPP_CombType.PYROTHEUM, new Materials[] {Materials.Blaze, Materials.Pyrotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100);
- addCentrifugeToMaterial(GTPP_CombType.CRYOTHEUM, new Materials[] {Materials.Blizz, Materials.Cryotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100);
-
- //Alloy
- addProcessGT(GTPP_CombType.REDALLOY, new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, Voltage.LV);
- addProcessGT(GTPP_CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal}, Voltage.LV);
- addProcessGT(GTPP_CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron, Materials.Silver, Materials.Iron }, Voltage.MV);
- addProcessGT(GTPP_CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy, Materials.Chrome }, Voltage.HV);
- addProcessGT(GTPP_CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy, Materials.Gold }, Voltage.HV);
- addProcessGT(GTPP_CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, Voltage.LV);
- addProcessGT(GTPP_CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel, Materials.Coal }, Voltage.MV);
- addProcessGT(GTPP_CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron, Materials.Iron }, Voltage.HV);
- addProcessGT(GTPP_CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, Materials.Nickel }, Voltage.HV);
- addCentrifugeToItemStack(GTPP_CombType.ENDERIUM, new ItemStack[] {ItemList.FR_RefractoryWax.get(1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) }, new int[] {50 * 100, 30 * 100, 50 * 100 }, Voltage.HV);
- if(GT_Mod.gregtechproxy.mNerfedCombs) {
- addCentrifugeToMaterial(GTPP_CombType.REDALLOY, new Materials[] {Materials.RedAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron }, new int[] {90 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy }, new int[] {70 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel }, new int[] {100 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel }, new int[] {100 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel }, new int[] {50 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- }else {
- addCentrifugeToMaterial(GTPP_CombType.REDALLOY, new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, new int[] {100 * 100, 75 * 100, 90 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100);
- addCentrifugeToMaterial(GTPP_CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy, Materials.Red