aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/forestry/bees
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2022-08-29 16:04:28 +0200
committerGitHub <noreply@github.com>2022-08-29 16:04:28 +0200
commit7d1f51a8937e0a86486267437d444696e81e8aa0 (patch)
treea5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/forestry/bees
parent5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff)
downloadGT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip
Buildscript + Spotless (#318)
* Convert AES.java to readable class * Buildscript * Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/forestry/bees')
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java30
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java119
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java1414
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java306
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java128
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java434
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java34
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_CombType.java93
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_DropType.java53
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PollenType.java89
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/handler/GTPP_PropolisType.java43
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java146
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java173
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java252
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java251
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Comb.java221
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java185
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java117
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java123
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java286
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java67
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java498
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java39
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java63
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java127
29 files changed, 2809 insertions, 2591 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java
index 77ee15c5d5..ea95479cf7 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java
@@ -1,4 +1,3 @@
-
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
@@ -16,9 +15,9 @@ import forestry.core.blocks.BlockBase;
import gtPlusPlus.core.creative.AddToCreativeTab;
public class BlockDenseBeeHouse extends BlockBase<BlockApicultureType> {
- public BlockDenseBeeHouse() {
- super();
- setCreativeTab(AddToCreativeTab.tabBOP);
- setHarvestLevel("axe", 0);
- }
-} \ No newline at end of file
+ public BlockDenseBeeHouse() {
+ super();
+ setCreativeTab(AddToCreativeTab.tabBOP);
+ setHarvestLevel("axe", 0);
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java
index fa36732cb6..02f74b55ae 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java
@@ -1,26 +1,24 @@
package gtPlusPlus.xmod.forestry.bees.blocks;
import cpw.mods.fml.common.registry.GameRegistry;
-
+import forestry.core.utils.StringUtil;
+import forestry.plugins.PluginManager;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
-
-import forestry.core.utils.StringUtil;
-import forestry.plugins.PluginManager;
import net.minecraftforge.oredict.OreDictionary;
public abstract class FR_BlockRegistry {
- protected static <T extends Block> T registerBlock(T block, Class<? extends ItemBlock> itemClass, String name) {
- if (PluginManager.getStage() != PluginManager.Stage.SETUP) {
- throw new RuntimeException("Tried to register Block outside of Setup");
- }
- block.setBlockName("for." + name);
- GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block));
- return block;
- }
+ protected static <T extends Block> T registerBlock(T block, Class<? extends ItemBlock> itemClass, String name) {
+ if (PluginManager.getStage() != PluginManager.Stage.SETUP) {
+ throw new RuntimeException("Tried to register Block outside of Setup");
+ }
+ block.setBlockName("for." + name);
+ GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block));
+ return block;
+ }
- protected static void registerOreDictWildcard(String oreDictName, Block block) {
- OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, 32767));
- }
-} \ No newline at end of file
+ protected static void registerOreDictWildcard(String oreDictName, Block block) {
+ OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, 32767));
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java
index b4d6e4c2fc..5423ae803b 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java
@@ -2,53 +2,50 @@ package gtPlusPlus.xmod.forestry.bees.custom;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
-
import gtPlusPlus.core.util.Utils;
-public enum CustomCombs {
- //Custom Bees
-
- //Rubbers & Silicons
+public enum CustomCombs {
+ // Custom Bees
+
+ // Rubbers & Silicons
SILICON("silicon", true, Materials.Silicon, 100),
RUBBER("rubber", true, Materials.Rubber, 100),
PLASTIC("polyethylene", true, Materials.Plastic, 75),
PTFE("polytetrafluoroethylene", true, GTPP_Bees.PTFE, 50),
PBS("styrene-butadiene", true, GTPP_Bees.PBS, 25),
-
- //Fuels
+
+ // Fuels
BIOMASS("biomass", true, Materials.Biomass, 100),
ETHANOL("ethanol", true, Materials.Ethanol, 75),
DIESEL("diesel", true, Materials.Fuel, 50),
NITRO("nitro", true, Materials.NitroFuel, 25),
HOOTCH("hootch", true, Materials.Silicon, 50),
ROCKETFUEL("rocket", true, Materials.Silicon, 25),
-
-
- //Materials which are hard, if not impossible to obtain.
+
+ // Materials which are hard, if not impossible to obtain.
FLUORINE("fluorine", true, Materials.Fluorine, 25),
COKE("coke", true, Materials._NULL, 50),
FORCE("force", true, Materials.Force, 50),
- NIKOLITE("nikolite", true, Materials.Nikolite, 75),
+ NIKOLITE("nikolite", true, Materials.Nikolite, 75),
MITHRIL("mithril", true, Materials.Mithril, 10),
ADAMANTIUM("adamantium", true, Materials.Adamantium, 5),
-
- //Trash
+
+ // Trash
SALT("salt", true, Materials.Salt, 75),
- SAND("sand", true, Materials.Sand, 100),
-
+ SAND("sand", true, Materials.Sand, 100),
;
- private static int[][] colours = new int[][]{
- {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //SILICON
- {Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)}, //RUBBER
- {Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)}, //PLASTIC
- {Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)}, //PTFE
- {Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)}, //PBS
- //Unused
- {Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)}, //Biofuel
- {Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)}, //Ethanol
+ private static int[][] colours = new int[][] {
+ {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // SILICON
+ {Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)}, // RUBBER
+ {Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)}, // PLASTIC
+ {Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)}, // PTFE
+ {Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)}, // PBS
+ // Unused
+ {Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)}, // Biofuel
+ {Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)}, // Ethanol
+ {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
- {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)}, // Fluorine
@@ -60,43 +57,44 @@ public enum CustomCombs {
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //
{Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)},
- {0x666666, 0x525252},
- {0x2E8F5B, 0xDCC289},
- {0x4C4C4C, 0x333333},
- {0x808080, 0x999999},
- {0x57CFFB, 0xBBEEFF},
- {0x7D0F0F, 0xD11919},
- {0x1947D1, 0x476CDA},
- {0xE6005C, 0xCC0052},
- {0x0033CC, 0x00248F},
- {0xCCFFFF, 0xA3CCCC},
- {0x248F24, 0xCCFFCC},
- {0x248F24, 0x2EB82E},
- {0xD4D4D4, 0x58300B},
- {0xFF6600, 0xE65C00},
- {0xD4D4D4, 0xDDDDDD},
- {0x666699, 0xA3A3CC},
- {0xDA9147, 0xDE9C59},
- {0x808080, 0x999999},
- {0x8585AD, 0x9D9DBD},
- {0xF0DEF0, 0xF2E1F2},
- {0xC2C2D6, 0xCECEDE},
- {0xE6B800, 0xCFA600},
- {0x008AB8, 0xD6D6FF},
- {0xD5D5D5, 0xAAAAAA},
- {0xCC99FF, 0xDBB8FF},
- {0xEBA1EB, 0xF2C3F2},
- {0x62626D, 0x161620},
- {0xE6E6E6, 0xFFFFCC},
- {0xDADADA, 0xD1D1E0},
- {0x19AF19, 0x169E16},
- {0x335C33, 0x6B8F00},
- {0x003300, 0x002400},
+ {0x666666, 0x525252},
+ {0x2E8F5B, 0xDCC289},
+ {0x4C4C4C, 0x333333},
+ {0x808080, 0x999999},
+ {0x57CFFB, 0xBBEEFF},
+ {0x7D0F0F, 0xD11919},
+ {0x1947D1, 0x476CDA},
+ {0xE6005C, 0xCC0052},
+ {0x0033CC, 0x00248F},
+ {0xCCFFFF, 0xA3CCCC},
+ {0x248F24, 0xCCFFCC},
+ {0x248F24, 0x2EB82E},
+ {0xD4D4D4, 0x58300B},
+ {0xFF6600, 0xE65C00},
+ {0xD4D4D4, 0xDDDDDD},
+ {0x666699, 0xA3A3CC},
+ {0xDA9147, 0xDE9C59},
+ {0x808080, 0x999999},
+ {0x8585AD, 0x9D9DBD},
+ {0xF0DEF0, 0xF2E1F2},
+ {0xC2C2D6, 0xCECEDE},
+ {0xE6B800, 0xCFA600},
+ {0x008AB8, 0xD6D6FF},
+ {0xD5D5D5, 0xAAAAAA},
+ {0xCC99FF, 0xDBB8FF},
+ {0xEBA1EB, 0xF2C3F2},
+ {0x62626D, 0x161620},
+ {0xE6E6E6, 0xFFFFCC},
+ {0xDADADA, 0xD1D1E0},
+ {0x19AF19, 0x169E16},
+ {0x335C33, 0x6B8F00},
+ {0x003300, 0x002400},
};
public boolean showInList;
public Materials material;
public int chance;
private String name;
+
private CustomCombs(String pName, boolean show, Materials material, int chance) {
this.name = pName;
this.material = material;
@@ -109,11 +107,12 @@ public enum CustomCombs {
}
public String getName() {
-// return "gt.comb."+this.name;
- return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb");
+ // return "gt.comb."+this.name;
+ return GT_LanguageManager.addStringLocalization(
+ "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb");
}
public int[] getColours() {
return colours[this.ordinal()];
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
index b36508f6aa..633178c851 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
@@ -1,14 +1,5 @@
package gtPlusPlus.xmod.forestry.bees.custom;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Locale;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-import org.apache.commons.lang3.text.WordUtils;
-
-import net.minecraft.item.ItemStack;
-
import forestry.api.apiculture.*;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
@@ -17,389 +8,28 @@ import forestry.api.genetics.IAllele;
import forestry.apiculture.genetics.*;
import forestry.core.genetics.alleles.AlleleHelper;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Locale;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.common.BiomeDictionary.Type;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.text.WordUtils;
public enum GTPP_Bee_Definition implements IBeeDefinition {
-
-
- SILICON(GTPP_Branch_Definition.ORGANIC, "Silicon", true, Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getSlagComb(), 0.10f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILICON), 0.20f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10);
- }
- },
-
- RUBBER(GTPP_Branch_Definition.ORGANIC, "Rubber", true, Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getSlagComb(), 0.10f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBBER), 0.30f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10);
- }
- },
-
- PLASTIC(GTPP_Branch_Definition.ORGANIC, "Plastic", true, Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PLASTIC), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(RUBBER.species, getGregtechBeeType("OIL"), 10);
- }
- },
-
- PTFE(GTPP_Branch_Definition.ORGANIC, "Ptfe", true, Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PTFE), 0.10f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(RUBBER.species, PLASTIC.species, 10);
- }
- },
-
- PBS(GTPP_Branch_Definition.ORGANIC, "Pbs", true, Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PBS), 0.10f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(PTFE.species, PLASTIC.species, 10);
- }
- },
-
-
-
-
- /**
- * Fuels
- */
-
- BIOMASS(GTPP_Branch_Definition.ORGANIC, "Biomass", true, Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.BIOMASS), 0.20f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Rural"), 10);
- tMutation.restrictBiomeType(Type.FOREST);
- }
- },
-
- ETHANOL(GTPP_Branch_Definition.ORGANIC, "Ethanol", true, Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ETHANOL), 0.20f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(BIOMASS.species, getSpecies("Farmerly"), 5);
- tMutation.restrictBiomeType(Type.FOREST);
- }
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /**
- * Materials
- */
-
-
- FLUORINE(GTPP_Branch_Definition.ORGANIC, "Fluorine", true, Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.40f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FLUORINE), 0.05f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.COLD);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("LAPIS"), getGregtechBeeType("SAPPHIRE"), 5);
- tMutation.restrictBiomeType(Type.COLD);
- }
- },
-
- //Coke
-
-
-
- //Force
- FORCE(GTPP_Branch_Definition.METAL, "Force", true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.25f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FORCE), 0.25f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SALT), 0.05f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.HOT);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("STEEL"), getGregtechBeeType("GOLD"), 10);
- tMutation.restrictBiomeType(Type.HOT);
- }
- },
-
- //Nikolite
- NIKOLITE(GTPP_Branch_Definition.METAL, "Nikolite", true, Utils.rgbtoHexValue(60, 180, 200), Utils.rgbtoHexValue(40, 150, 170)) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(getStoneComb(), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NIKOLITE), 0.05f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.HOT);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("ALUMINIUM"), getGregtechBeeType("SILVER"), 8);
- tMutation.restrictBiomeType(Type.HOT);
- }
- },
-
-
-
-
-
-
-
- /*
-
-
- CLAY(GTPP_Branch_Definition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
- beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.DAMP);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.MEADOWS.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20);
- }
- },
- SLIMEBALL(GTPP_Branch_Definition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STICKY), 0.30f);
- beeSpecies.setHumidity(EnumHumidity.DAMP);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.MARSHY.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Marshy"), CLAY.species, 15);
- }
- },
- PEAT(GTPP_Branch_Definition.ORGANIC, "Peat", true, 0x906237, 0x58300B) {
+ SILICON(
+ GTPP_Branch_Definition.ORGANIC,
+ "Silicon",
+ true,
+ Utils.rgbtoHexValue(75, 75, 75),
+ Utils.rgbtoHexValue(125, 125, 125)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f);
- beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.RURAL.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Rural"), CLAY.species, 20);
- }
- },
- STICKYRESIN(GTPP_Branch_Definition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
- beeSpecies.addProduct(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.MEADOWS.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 25);
- }
- },
- COAL(GTPP_Branch_Definition.ORGANIC, "Coal", true, 0x666666, 0x525252) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COAL), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.AUSTERE.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), PEAT.species, 18);
- }
- },
- OIL(GTPP_Branch_Definition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OIL), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.DAMP);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- beeSpecies.setNocturnal();
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.MEADOWS.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 8);
- }
- },
- REDSTONE(GTPP_Branch_Definition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.REDSTONE), 0.15f);
+ beeSpecies.addProduct(getSlagComb(), 0.10f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILICON), 0.20f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -411,33 +41,21 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20);
+ IBeeMutationCustom tMutation =
+ registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10);
}
},
- LAPIS(GTPP_Branch_Definition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LAPIS), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20);
- }
- },
- CERTUS(GTPP_Branch_Definition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) {
+ RUBBER(
+ GTPP_Branch_Definition.ORGANIC,
+ "Rubber",
+ true,
+ Utils.rgbtoHexValue(55, 55, 55),
+ Utils.rgbtoHexValue(75, 75, 75)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.CERTUS), 0.15f);
+ beeSpecies.addProduct(getSlagComb(), 0.10f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBBER), 0.30f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -449,33 +67,21 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Hermitic"), LAPIS.species, 20);
+ IBeeMutationCustom tMutation =
+ registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10);
}
},
- RUBY(GTPP_Branch_Definition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBY), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, DIAMOND.species, 10);
- }
- },
- SAPPHIRE(GTPP_Branch_Definition.GEM, "Sapphire", true, 0x0033CC, 0x00248F) {
+ PLASTIC(
+ GTPP_Branch_Definition.ORGANIC,
+ "Plastic",
+ true,
+ Utils.rgbtoHexValue(245, 245, 245),
+ Utils.rgbtoHexValue(175, 175, 175)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAPPHIRE), 0.15f);
+ beeSpecies.addProduct(getStoneComb(), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PLASTIC), 0.15f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -487,33 +93,20 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(CERTUS.species, LAPIS.species, 10);
+ IBeeMutationCustom tMutation = registerMutation(RUBBER.species, getGregtechBeeType("OIL"), 10);
}
},
- DIAMOND(GTPP_Branch_Definition.GEM, "Diamond", true, 0xCCFFFF, 0xA3CCCC) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.DIAMOND), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(CERTUS.species, COAL.species, 6);
- }
- },
- OLIVINE(GTPP_Branch_Definition.GEM, "Olivine", true, 0x248F24, 0xCCFFCC) {
+ PTFE(
+ GTPP_Branch_Definition.ORGANIC,
+ "Ptfe",
+ true,
+ Utils.rgbtoHexValue(150, 150, 150),
+ Utils.rgbtoHexValue(75, 75, 75)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OLIVINE), 0.15f);
+ beeSpecies.addProduct(getStoneComb(), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PTFE), 0.10f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -525,33 +118,15 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies("Ended"), 10);
+ IBeeMutationCustom tMutation = registerMutation(RUBBER.species, PLASTIC.species, 10);
}
},
- EMERALD(GTPP_Branch_Definition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.EMERALD), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.COLD);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(OLIVINE.species, DIAMOND.species, 8);
- }
- },
- COPPER(GTPP_Branch_Definition.METAL, "Copper", true, 0xFF6600, 0xE65C00) {
+ PBS(GTPP_Branch_Definition.ORGANIC, "Pbs", true, Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COPPER), 0.15f);
+ beeSpecies.addProduct(getStoneComb(), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PBS), 0.10f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -563,14 +138,23 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(getSpecies("Majestic"), CLAY.species, 25);
+ IBeeMutationCustom tMutation = registerMutation(PTFE.species, PLASTIC.species, 10);
}
},
- TIN(GTPP_Branch_Definition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) {
+
+ /**
+ * Fuels
+ */
+ BIOMASS(
+ GTPP_Branch_Definition.ORGANIC,
+ "Biomass",
+ true,
+ Utils.rgbtoHexValue(33, 225, 24),
+ Utils.rgbtoHexValue(23, 175, 14)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TIN), 0.15f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.BIOMASS), 0.20f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -582,33 +166,21 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies("Diligent"), 25);
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Rural"), 10);
+ tMutation.restrictBiomeType(Type.FOREST);
}
},
- LEAD(GTPP_Branch_Definition.METAL, "Lead", true, 0x666699, 0xA3A3CC) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LEAD), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.DAMP);
- beeSpecies.setTemperature(EnumTemperature.WARM);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(COAL.species, COPPER.species, 25);
- }
- },
- IRON(GTPP_Branch_Definition.METAL, "Iron", true, 0xDA9147, 0xDE9C59) {
+ ETHANOL(
+ GTPP_Branch_Definition.ORGANIC,
+ "Ethanol",
+ true,
+ Utils.rgbtoHexValue(255, 128, 0),
+ Utils.rgbtoHexValue(220, 156, 32)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.IRON), 0.15f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ETHANOL), 0.20f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.NORMAL);
}
@@ -620,35 +192,26 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(TIN.species, COPPER.species, 25);
+ IBeeMutationCustom tMutation = registerMutation(BIOMASS.species, getSpecies("Farmerly"), 5);
+ tMutation.restrictBiomeType(Type.FOREST);
}
},
- STEEL(GTPP_Branch_Definition.METAL, "Steel", true, 0x808080, 0x999999) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STEEL), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
-
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(IRON.species, COAL.species, 20);
- }
- },
- NICKEL(GTPP_Branch_Definition.METAL, "Nickel", true, 0x8585AD, 0x8585AD) {
+ /**
+ * Materials
+ */
+ FLUORINE(
+ GTPP_Branch_Definition.ORGANIC,
+ "Fluorine",
+ true,
+ Utils.rgbtoHexValue(30, 230, 230),
+ Utils.rgbtoHexValue(10, 150, 150)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NICKEL), 0.15f);
+ beeSpecies.addProduct(getStoneComb(), 0.40f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FLUORINE), 0.05f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.COLD);
}
@Override
@@ -658,35 +221,29 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(IRON.species, COPPER.species, 25);
+ IBeeMutationCustom tMutation =
+ registerMutation(getGregtechBeeType("LAPIS"), getGregtechBeeType("SAPPHIRE"), 5);
+ tMutation.restrictBiomeType(Type.COLD);
}
},
- ZINC(GTPP_Branch_Definition.METAL, "Zinc", true, 0xF0DEF0, 0xF2E1F2) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ZINC), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
+ // Coke
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(IRON.species, TIN.species, 20);
- }
- },
- SILVER(GTPP_Branch_Definition.METAL, "Silver", true, 0xC2C2D6, 0xCECEDE) {
+ // Force
+ FORCE(
+ GTPP_Branch_Definition.METAL,
+ "Force",
+ true,
+ Utils.rgbtoHexValue(250, 250, 20),
+ Utils.rgbtoHexValue(200, 200, 5)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILVER), 0.15f);
+ beeSpecies.addProduct(getStoneComb(), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.25f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FORCE), 0.25f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SALT), 0.05f);
beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.HOT);
}
@Override
@@ -696,34 +253,24 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(LEAD.species, TIN.species, 20);
+ IBeeMutationCustom tMutation =
+ registerMutation(getGregtechBeeType("STEEL"), getGregtechBeeType("GOLD"), 10);
+ tMutation.restrictBiomeType(Type.HOT);
}
},
- GOLD(GTPP_Branch_Definition.METAL, "Gold", true, 0xEBC633, 0xEDCC47) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.GOLD), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.NORMAL);
- beeSpecies.setTemperature(EnumTemperature.NORMAL);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(LEAD.species, COPPER.species, 20);
- }
- },
- ALUMINIUM(GTPP_Branch_Definition.RAREMETAL, "Aluminium", true, 0xB8B8FF, 0xD6D6FF) {
+ // Nikolite
+ NIKOLITE(
+ GTPP_Branch_Definition.METAL,
+ "Nikolite",
+ true,
+ Utils.rgbtoHexValue(60, 180, 200),
+ Utils.rgbtoHexValue(40, 150, 170)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ALUMINIUM), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(getStoneComb(), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NIKOLITE), 0.05f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
beeSpecies.setTemperature(EnumTemperature.HOT);
}
@@ -734,143 +281,608 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
@Override
protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(NICKEL.species, ZINC.species, 18);
+ IBeeMutationCustom tMutation =
+ registerMutation(getGregtechBeeType("ALUMINIUM"), getGregtechBeeType("SILVER"), 8);
+ tMutation.restrictBiomeType(Type.HOT);
}
},
- TITANIUM(GTPP_Branch_Definition.RAREMETAL, "Titanium", true, 0xCC99FF, 0xDBB8FF) {
- @Override
- protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
- beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TITANIUM), 0.15f);
- beeSpecies.setHumidity(EnumHumidity.ARID);
- beeSpecies.setTemperature(EnumTemperature.HOT);
- }
- @Override
- protected void setAlleles(IAllele[] template) {
- template = BeeDefinition.COMMON.getTemplate();
- }
-
- @Override
- protected void registerMutations() {
- IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, ALUMINIUM.species, 5);
+/*
+
+
+CLAY(GTPP_Branch_Definition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
+ beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.DAMP);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.MEADOWS.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20);
+ }
+ },
+ SLIMEBALL(GTPP_Branch_Definition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STICKY), 0.30f);
+ beeSpecies.setHumidity(EnumHumidity.DAMP);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.MARSHY.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Marshy"), CLAY.species, 15);
+ }
+ },
+ PEAT(GTPP_Branch_Definition.ORGANIC, "Peat", true, 0x906237, 0x58300B) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f);
+ beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.RURAL.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Rural"), CLAY.species, 20);
+ }
+ },
+ STICKYRESIN(GTPP_Branch_Definition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
+ beeSpecies.addProduct(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.MEADOWS.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 25);
+ }
+ },
+ COAL(GTPP_Branch_Definition.ORGANIC, "Coal", true, 0x666666, 0x525252) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COAL), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.AUSTERE.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), PEAT.species, 18);
+ }
+ },
+ OIL(GTPP_Branch_Definition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OIL), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.DAMP);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ beeSpecies.setNocturnal();
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.MEADOWS.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 8);
+ }
+ },
+ REDSTONE(GTPP_Branch_Definition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.REDSTONE), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20);
+ }
+ },
+ LAPIS(GTPP_Branch_Definition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LAPIS), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20);
+ }
+ },
+ CERTUS(GTPP_Branch_Definition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.CERTUS), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Hermitic"), LAPIS.species, 20);
+ }
+ },
+ RUBY(GTPP_Branch_Definition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBY), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, DIAMOND.species, 10);
+ }
+ },
+ SAPPHIRE(GTPP_Branch_Definition.GEM, "Sapphire", true, 0x0033CC, 0x00248F) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAPPHIRE), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(CERTUS.species, LAPIS.species, 10);
+ }
+ },
+ DIAMOND(GTPP_Branch_Definition.GEM, "Diamond", true, 0xCCFFFF, 0xA3CCCC) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.DIAMOND), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(CERTUS.species, COAL.species, 6);
+ }
+ },
+ OLIVINE(GTPP_Branch_Definition.GEM, "Olivine", true, 0x248F24, 0xCCFFCC) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OLIVINE), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies("Ended"), 10);
+ }
+ },
+ EMERALD(GTPP_Branch_Definition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.EMERALD), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.COLD);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(OLIVINE.species, DIAMOND.species, 8);
+ }
+ },
+ COPPER(GTPP_Branch_Definition.METAL, "Copper", true, 0xFF6600, 0xE65C00) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COPPER), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(getSpecies("Majestic"), CLAY.species, 25);
+ }
+ },
+ TIN(GTPP_Branch_Definition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TIN), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies("Diligent"), 25);
+ }
+ },
+ LEAD(GTPP_Branch_Definition.METAL, "Lead", true, 0x666699, 0xA3A3CC) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LEAD), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.DAMP);
+ beeSpecies.setTemperature(EnumTemperature.WARM);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(COAL.species, COPPER.species, 25);
+ }
+ },
+ IRON(GTPP_Branch_Definition.METAL, "Iron", true, 0xDA9147, 0xDE9C59) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.IRON), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(TIN.species, COPPER.species, 25);
+ }
+ },
+ STEEL(GTPP_Branch_Definition.METAL, "Steel", true, 0x808080, 0x999999) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STEEL), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(IRON.species, COAL.species, 20);
+ }
+ },
+ NICKEL(GTPP_Branch_Definition.METAL, "Nickel", true, 0x8585AD, 0x8585AD) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NICKEL), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(IRON.species, COPPER.species, 25);
+ }
+ },
+ ZINC(GTPP_Branch_Definition.METAL, "Zinc", true, 0xF0DEF0, 0xF2E1F2) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ZINC), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(IRON.species, TIN.species, 20);
+ }
+ },
+ SILVER(GTPP_Branch_Definition.METAL, "Silver", true, 0xC2C2D6, 0xCECEDE) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILVER), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(LEAD.species, TIN.species, 20);
+ }
+ },
+ GOLD(GTPP_Branch_Definition.METAL, "Gold", true, 0xEBC633, 0xEDCC47) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.GOLD), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.NORMAL);
+ beeSpecies.setTemperature(EnumTemperature.NORMAL);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(LEAD.species, COPPER.species, 20);
+ }
+ },
+ ALUMINIUM(GTPP_Branch_Definition.RAREMETAL, "Aluminium", true, 0xB8B8FF, 0xD6D6FF) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ALUMINIUM), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.ARID);
+ beeSpecies.setTemperature(EnumTemperature.HOT);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(NICKEL.species, ZINC.species, 18);
+ }
+ },
+ TITANIUM(GTPP_Branch_Definition.RAREMETAL, "Titanium", true, 0xCC99FF, 0xDBB8FF) {
+ @Override
+ protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f);
+ beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TITANIUM), 0.15f);
+ beeSpecies.setHumidity(EnumHumidity.ARID);
+ beeSpecies.setTemperature(EnumTemperature.HOT);
+ }
+
+ @Override
+ protected void setAlleles(IAllele[] template) {
+ template = BeeDefinition.COMMON.getTemplate();
+ }
+
+ @Override
+ protected void registerMutations() {
+ IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, ALUMINIUM.species, 5);
+ }
+ }*/
+
+;
+
+ private final GTPP_Branch_Definition branch;
+ private final IAlleleBeeSpeciesCustom species;
+
+ private IAllele[] template;
+ private IBeeGenome genome;
+
+ GTPP_Bee_Definition(GTPP_Branch_Definition branch, String binomial, boolean dominant, int primary, int secondary) {
+ String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH);
+ String species = "species" + WordUtils.capitalize(lowercaseName);
+
+ String uid = "forestry." + species;
+ String description = "for.description." + species;
+ String name = "for.bees.species." + lowercaseName;
+
+ this.branch = branch;
+ this.species = BeeManager.beeFactory.createSpecies(
+ uid, dominant, "Sengir", name, description, branch.getBranch(), binomial, primary, secondary);
+ }
+
+ public static void initBees() {
+ for (GTPP_Bee_Definition bee : values()) {
+ bee.init();
+ }
+ for (GTPP_Bee_Definition bee : values()) {
+ bee.registerMutations();
+ }
+ }
+
+ private static IAlleleBeeSpecies getSpecies(String name) {
+ return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(
+ (new StringBuilder()).append("forestry.species").append(name).toString());
+ }
+
+ protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies);
+
+ protected abstract void setAlleles(IAllele[] template);
+
+ protected abstract void registerMutations();
+
+ private void init() {
+ setSpeciesProperties(species);
+
+ template = branch.getTemplate();
+ AlleleHelper.instance.set(template, EnumBeeChromosome.SPECIES, species);
+ setAlleles(template);
+
+ genome = BeeManager.beeRoot.templateAsGenome(template);
+
+ BeeManager.beeRoot.registerTemplate(template);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) {
+ IAllele[] template = getTemplate();
+ Logger.DEBUG_BEES("parent1: " + (parent1 != null));
+ Logger.DEBUG_BEES("parent2: " + (parent2 != null));
+ Logger.DEBUG_BEES("chance: " + (chance));
+ Logger.DEBUG_BEES("template: " + (template != null));
+ return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance);
+ }
+
+ @Override
+ public final IAllele[] getTemplate() {
+ return Arrays.copyOf(template, template.length);
+ }
+
+ @Override
+ public final IBeeGenome getGenome() {
+ return genome;
+ }
+
+ @Override
+ public final IBee getIndividual() {
+ return new Bee(genome);
+ }
+
+ @Override
+ public final ItemStack getMemberStack(EnumBeeType beeType) {
+ IBee bee = getIndividual();
+ return BeeManager.beeRoot.getMemberStack(bee, beeType.ordinal());
+ }
+
+ public final IBeeDefinition getRainResist() {
+ return new BeeVariation.RainResist(this);
+ }
+
+ private static ItemStack getSlagComb() {
+ return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Slag, 1));
+ }
+
+ private static ItemStack getStoneComb() {
+ return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Stone, 1));
+ }
+
+ private static ItemStack issStackValid(ItemStack result) {
+ if (result == null) {
+ return ItemUtils.getErrorStack(1);
}
- }*/
-
- ;
-
-
- private final GTPP_Branch_Definition branch;
- private final IAlleleBeeSpeciesCustom species;
-
- private IAllele[] template;
- private IBeeGenome genome;
-
- GTPP_Bee_Definition(GTPP_Branch_Definition branch, String binomial, boolean dominant, int primary, int secondary) {
- String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH);
- String species = "species" + WordUtils.capitalize(lowercaseName);
-
- String uid = "forestry." + species;
- String description = "for.description." + species;
- String name = "for.bees.species." + lowercaseName;
-
- this.branch = branch;
- this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "Sengir", name, description, branch.getBranch(), binomial, primary, secondary);
- }
-
- public static void initBees() {
- for (GTPP_Bee_Definition bee : values()) {
- bee.init();
- }
- for (GTPP_Bee_Definition bee : values()) {
- bee.registerMutations();
- }
- }
-
- private static IAlleleBeeSpecies getSpecies(String name) {
- return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
- }
-
- protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies);
-
- protected abstract void setAlleles(IAllele[] template);
-
- protected abstract void registerMutations();
-
- private void init() {
- setSpeciesProperties(species);
-
- template = branch.getTemplate();
- AlleleHelper.instance.set(template, EnumBeeChromosome.SPECIES, species);
- setAlleles(template);
-
- genome = BeeManager.beeRoot.templateAsGenome(template);
-
- BeeManager.beeRoot.registerTemplate(template);
- }
-
- protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) {
- IAllele[] template = getTemplate();
- Logger.DEBUG_BEES("parent1: "+(parent1 != null));
- Logger.DEBUG_BEES("parent2: "+(parent2 != null));
- Logger.DEBUG_BEES("chance: "+(chance));
- Logger.DEBUG_BEES("template: "+(template != null));
- return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance);
- }
-
- @Override
- public final IAllele[] getTemplate() {
- return Arrays.copyOf(template, template.length);
- }
-
- @Override
- public final IBeeGenome getGenome() {
- return genome;
- }
-
- @Override
- public final IBee getIndividual() {
- return new Bee(genome);
- }
-
- @Override
- public final ItemStack getMemberStack(EnumBeeType beeType) {
- IBee bee = getIndividual();
- return BeeManager.beeRoot.getMemberStack(bee, beeType.ordinal());
- }
-
- public final IBeeDefinition getRainResist() {
- return new BeeVariation.RainResist(this);
- }
-
- private static ItemStack getSlagComb(){
- return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Slag, 1));
- }
- private static ItemStack getStoneComb(){
- return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Stone, 1));
- }
-
- private static ItemStack issStackValid(ItemStack result){
- if (result == null){
- return ItemUtils.getErrorStack(1);
- }
- return result;
- }
-
- public static IAlleleBeeSpecies getGregtechBeeType(String name){
- Class<?> gtBees;
- try {
- Class gtBeeTypes = Class.forName("gregtech.loaders.misc.GT_BeeDefinition");
- Enum gtBeeEnumObject = Enum.valueOf(gtBeeTypes, name);
- Field gtBeesField = FieldUtils.getDeclaredField(gtBeeTypes, "species", true);
- gtBeesField.setAccessible(true);
- ReflectionUtils.makeFieldAccessible(gtBeesField);
- Object beeType = gtBeesField.get(gtBeeEnumObject);
- return (IAlleleBeeSpecies) beeType;
- }
- catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
- e.printStackTrace();
- }
- return null;
- }
+ return result;
+ }
+
+ public static IAlleleBeeSpecies getGregtechBeeType(String name) {
+ Class<?> gtBees;
+ try {
+ Class gtBeeTypes = Class.forName("gregtech.loaders.misc.GT_BeeDefinition");
+ Enum gtBeeEnumObject = Enum.valueOf(gtBeeTypes, name);
+ Field gtBeesField = FieldUtils.getDeclaredField(gtBeeTypes, "species", true);
+ gtBeesField.setAccessible(true);
+ ReflectionUtils.makeFieldAccessible(gtBeesField);
+ Object beeType = gtBeesField.get(gtBeeEnumObject);
+ return (IAlleleBeeSpecies) beeType;
+ } catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
index 49b8da0d1b..1007eac0be 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
@@ -1,11 +1,5 @@
package gtPlusPlus.xmod.forestry.bees.custom;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-
import cpw.mods.fml.common.Loader;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
@@ -20,176 +14,176 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+import org.apache.commons.lang3.reflect.FieldUtils;
public class GTPP_Bees {
-
- //Custom Comb Drop Base Items
- public static Item dropForceGem;
- public static Item dropBiomassBlob;
- public static Item dropEthanolBlob;
- public static Item dropNikoliteDust;
- public static Item dropFluorineBlob;
-
- //Base Comb Item
+
+ // Custom Comb Drop Base Items
+ public static Item dropForceGem;
+ public static Item dropBiomassBlob;
+ public static Item dropEthanolBlob;
+ public static Item dropNikoliteDust;
+ public static Item dropFluorineBlob;
+
+ // Base Comb Item
public static ItemCustomComb combs;
- //Combs obtained via reflection
+ // Combs obtained via reflection
public static ItemStack Comb_Slag;
public static ItemStack Comb_Stone;
-
- //Materials obtained via reflection
+
+ // Materials obtained via reflection
public static Materials PTFE;
public static Materials PBS;
- //public static GTPP_Branch_Definition definition;
-
+ // public static GTPP_Branch_Definition definition;
public GTPP_Bees() {
if (Loader.isModLoaded("Forestry") /*&& tryGetBeesBoolean()*/) {
-
- for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()){
- //Utils.LOG_DEBUG_BEES(" ==================================================");
- //Utils.LOG_DEBUG_BEES(" Name: "+o.getName());
- //Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName());
- //Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID());
- //Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant());
- }
-
- //Set Materials and Comb stacks from GT via Reflection
- setMaterials();
- setCustomItems();
-
- try {
- combs = new ItemCustomComb();
- combs.initCombsRecipes();
- GTPP_Bee_Definition.initBees();
- }
- catch (Throwable t){
- Logger.BEES("Failed to load bees, probably due to an ancient forestry version");
- t.printStackTrace();
- }
+
+ for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ // Utils.LOG_DEBUG_BEES(" ==================================================");
+ // Utils.LOG_DEBUG_BEES(" Name: "+o.getName());
+ // Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName());
+ // Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID());
+ // Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant());
+ }
+
+ // Set Materials and Comb stacks from GT via Reflection
+ setMaterials();
+ setCustomItems();
+
+ try {
+ combs = new ItemCustomComb();
+ combs.initCombsRecipes();
+ GTPP_Bee_Definition.initBees();
+ } catch (Throwable t) {
+ Logger.BEES("Failed to load bees, probably due to an ancient forestry version");
+ t.printStackTrace();
+ }
}
}
-
+
private void setCustomItems() {
- dropForceGem = new BaseItemMisc("Force", new short[]{250, 250, 20}, 64, MiscTypes.GEM, null);
- //mGregMatLoader.enableMaterial(Materials.Force);
- //MaterialUtils.tryEnableMaterial(Materials.Force);
- //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force);
- //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force);
- dropBiomassBlob = new BaseItemMisc("Biomass", new short[]{33, 225, 24}, 64, MiscTypes.DROP, null);
- dropEthanolBlob = new BaseItemMisc("Ethanol", new short[]{255, 128, 0}, 64, MiscTypes.DROP, null);
-
- //Nikolite may not exist, so lets make it.
- dropNikoliteDust = ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2];
- //mGregMatLoader.enableMaterial(Materials.BlueAlloy);
- //mGregMatLoader.enableMaterial(Materials.Nikolite);
- //MaterialUtils.tryEnableMaterial(Materials.Nikolite);
- //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite);
- //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite);
- //MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite);
- //MaterialUtils.tryEnableMaterial(Materials.BlueAlloy);
- if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null){
- new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0);
- }
-
- dropFluorineBlob = new BaseItemMisc("Fluorine", new short[]{30, 230, 230}, 64, MiscTypes.DROP, null);
- addRecipes();
- }
-
- private void addRecipes(){
- addExtractorRecipe(ItemUtils.getSimpleStack(dropBiomassBlob), FluidUtils.getFluidStack("biomass", 30));
- addExtractorRecipe(ItemUtils.getSimpleStack(dropEthanolBlob), FluidUtils.getFluidStack("ethanol", 6));
- addExtractorRecipe(ItemUtils.getSimpleStack(dropFluorineBlob), FluidUtils.getFluidStack("fluorine", 4));
+ dropForceGem = new BaseItemMisc("Force", new short[] {250, 250, 20}, 64, MiscTypes.GEM, null);
+ // mGregMatLoader.enableMaterial(Materials.Force);
+ // MaterialUtils.tryEnableMaterial(Materials.Force);
+ // MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force);
+ // MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force);
+ dropBiomassBlob = new BaseItemMisc("Biomass", new short[] {33, 225, 24}, 64, MiscTypes.DROP, null);
+ dropEthanolBlob = new BaseItemMisc("Ethanol", new short[] {255, 128, 0}, 64, MiscTypes.DROP, null);
+
+ // Nikolite may not exist, so lets make it.
+ dropNikoliteDust =
+ ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2];
+ // mGregMatLoader.enableMaterial(Materials.BlueAlloy);
+ // mGregMatLoader.enableMaterial(Materials.Nikolite);
+ // MaterialUtils.tryEnableMaterial(Materials.Nikolite);
+ // MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite);
+ // MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite);
+ // MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite);
+ // MaterialUtils.tryEnableMaterial(Materials.BlueAlloy);
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null) {
+ new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0);
+ }
+
+ dropFluorineBlob = new BaseItemMisc("Fluorine", new short[] {30, 230, 230}, 64, MiscTypes.DROP, null);
+ addRecipes();
}
-
- private void addExtractorRecipe(ItemStack input, FluidStack output){
- CORE.RA.addFluidExtractionRecipe(
- input,
- output,
- 30,
- 8);
+
+ private void addRecipes() {
+ addExtractorRecipe(ItemUtils.getSimpleStack(dropBiomassBlob), FluidUtils.getFluidStack("biomass", 30));
+ addExtractorRecipe(ItemUtils.getSimpleStack(dropEthanolBlob), FluidUtils.getFluidStack("ethanol", 6));
+ addExtractorRecipe(ItemUtils.getSimpleStack(dropFluorineBlob), FluidUtils.getFluidStack("fluorine", 4));
}
-
-
- private static boolean tryGetBeesBoolean(){
- try {
- Class<?> mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy");
- Field mNerf = FieldUtils.getDeclaredField(mProxy, "mGTBees", true);
- boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy);
- return returnValue;
- }
- catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
- return false;
- }
- }
-
- private void setMaterials(){
- try {
-
- Class<?> gtBees = Class.forName("gregtech.loaders.misc.GT_Bees");
- Class<?> gtCombItemClass = Class.forName("gregtech.common.items.ItemComb");
- Class gtCombEnumClass = Class.forName("gregtech.common.items.CombType");
- Field gtCombs = FieldUtils.getDeclaredField(gtBees, "combs", true);
- gtCombs.setAccessible(true);
- ReflectionUtils.makeFieldAccessible(gtCombs);
- Enum gtCombTypeSlag = Enum.valueOf(gtCombEnumClass, "SLAG");
- Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE");
- Object oCombObject = gtCombs.get(null);
-
- Logger.DEBUG_BEES("Field getModifiers: "+gtCombs.getModifiers());
- Logger.DEBUG_BEES("Field toGenericString: "+gtCombs.toGenericString());
- Logger.DEBUG_BEES("Field getClass: "+gtCombs.getClass());
- Logger.DEBUG_BEES("Field isEnumConstant: "+gtCombs.isEnumConstant());
- Logger.DEBUG_BEES("Field isSynthetic: "+gtCombs.isSynthetic());
- Logger.DEBUG_BEES("Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null));
- Logger.DEBUG_BEES("Field isAccessible: "+gtCombs.isAccessible());
-
-
- Logger.BEES("gtBees: "+(gtBees != null));
- Logger.BEES("gtCombItemClass: "+(gtCombItemClass != null));
- Logger.BEES("gtCombEnumClass: "+(gtCombEnumClass != null));
- Logger.BEES("gtCombs: "+(gtCombs != null));
- Logger.BEES("gtCombTypeSlag: "+(gtCombTypeSlag != null));
- Logger.BEES("gtCombTypeStone: "+(gtCombTypeStone != null));
- Logger.BEES("oCombObject: "+(oCombObject != null));
-
-
- //if (gtCombItemClass.isInstance(oCombObject)){
- Method getStackForType;
- getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass);
-
- if (getStackForType != null) {
- Logger.BEES("Found Method: getStackForType");
- }
- if (Comb_Slag == null){
- Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag);
- }
- if (Comb_Stone == null){
- Comb_Stone = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeStone);
- }
- /*}
- else {
- Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb");
- }*/
-
- }
- catch (NullPointerException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | SecurityException | InvocationTargetException e){
- Logger.BEES("Bad Reflection. setMaterials()");
- }
-
- PTFE = trySetValue("Polytetrafluoroethylene");
- PBS = trySetValue("StyreneButadieneRubber");
+
+ private void addExtractorRecipe(ItemStack input, FluidStack output) {
+ CORE.RA.addFluidExtractionRecipe(input, output, 30, 8);
+ }
+
+ private static boolean tryGetBeesBoolean() {
+ try {
+ Class<?> mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy");
+ Field mNerf = FieldUtils.getDeclaredField(mProxy, "mGTBees", true);
+ boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy);
+ return returnValue;
+ } catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
+ return false;
+ }
+ }
+
+ private void setMaterials() {
+ try {
+
+ Class<?> gtBees = Class.forName("gregtech.loaders.misc.GT_Bees");
+ Class<?> gtCombItemClass = Class.forName("gregtech.common.items.ItemComb");
+ Class gtCombEnumClass = Class.forName("gregtech.common.items.CombType");
+ Field gtCombs = FieldUtils.getDeclaredField(gtBees, "combs", true);
+ gtCombs.setAccessible(true);
+ ReflectionUtils.makeFieldAccessible(gtCombs);
+ Enum gtCombTypeSlag = Enum.valueOf(gtCombEnumClass, "SLAG");
+ Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE");
+ Object oCombObject = gtCombs.get(null);
+
+ Logger.DEBUG_BEES("Field getModifiers: " + gtCombs.getModifiers());
+ Logger.DEBUG_BEES("Field toGenericString: " + gtCombs.toGenericString());
+ Logger.DEBUG_BEES("Field getClass: " + gtCombs.getClass());
+ Logger.DEBUG_BEES("Field isEnumConstant: " + gtCombs.isEnumConstant());
+ Logger.DEBUG_BEES("Field isSynthetic: " + gtCombs.isSynthetic());
+ Logger.DEBUG_BEES("Field get(gtBees) != null: " + (gtCombs.get(gtBees) != null));
+ Logger.DEBUG_BEES("Field isAccessible: " + gtCombs.isAccessible());
+
+ Logger.BEES("gtBees: " + (gtBees != null));
+ Logger.BEES("gtCombItemClass: " + (gtCombItemClass != null));
+ Logger.BEES("gtCombEnumClass: " + (gtCombEnumClass != null));
+ Logger.BEES("gtCombs: " + (gtCombs != null));
+ Logger.BEES("gtCombTypeSlag: " + (gtCombTypeSlag != null));
+ Logger.BEES("gtCombTypeStone: " + (gtCombTypeStone != null));
+ Logger.BEES("oCombObject: " + (oCombObject != null));
+
+ // if (gtCombItemClass.isInstance(oCombObject)){
+ Method getStackForType;
+ getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass);
+
+ if (getStackForType != null) {
+ Logger.BEES("Found Method: getStackForType");
+ }
+ if (Comb_Slag == null) {
+ Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag);
+ }
+ if (Comb_Stone == null) {
+ Comb_Stone = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeStone);
+ }
+ /*}
+ else {
+ Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb");
+ }*/
+
+ } catch (NullPointerException
+ | ClassNotFoundException
+ | IllegalArgumentException
+ | IllegalAccessException
+ | NoSuchMethodException
+ | SecurityException
+ | InvocationTargetException e) {
+ Logger.BEES("Bad Reflection. setMaterials()");
+ }
+
+ PTFE = trySetValue("Polytetrafluoroethylene");
+ PBS = trySetValue("StyreneButadieneRubber");
}
-
- private Materials trySetValue(String material){
- Materials mTemp = Materials.valueOf(material);
- if (mTemp != null){
- return mTemp;
- }
- return Materials._NULL;
+
+ private Materials trySetValue(String material) {
+ Materials mTemp = Materials.valueOf(material);
+ if (mTemp != null) {
+ return mTemp;
+ }
+ return Materials._NULL;
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
index f59f0c537f..d61f0d749d 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
@@ -1,80 +1,82 @@
package gtPlusPlus.xmod.forestry.bees.custom;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IClassification;
import gtPlusPlus.api.objects.Logger;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
public enum GTPP_Branch_Definition {
+ ORGANIC("ORGANIC"),
+ GEM("GEM"),
+ METAL("METAL"),
+ RAREMETAL("RAREMETAL"),
+ RADIOACTIVE("RADIOACTIVE");
- ORGANIC("ORGANIC"),
- GEM("GEM"),
- METAL("METAL"),
- RAREMETAL("RAREMETAL"),
- RADIOACTIVE("RADIOACTIVE");
-
- final String mFieldName;
- final Enum mActualValues;
- GTPP_Branch_Definition(String mValue){
- this.mFieldName = mValue;
- this.mActualValues = setEnumVar(mValue);
- }
+ final String mFieldName;
+ final Enum mActualValues;
- public final IAllele[] getTemplate() {
- Class gtBranchDefClass;
- try {
- gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
- Enum enumA = mActualValues;
- Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate");
+ GTPP_Branch_Definition(String mValue) {
+ this.mFieldName = mValue;
+ this.mActualValues = setEnumVar(mValue);
+ }
- Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
- Logger.INFO("[Bees] enumA: "+(enumA != null));
- Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
-
- return (IAllele[]) methodMyMethod.invoke(enumA);
- }
- catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Logger.INFO("[Bees] Bad Reflection. getTemplate()");
- e.printStackTrace();
- //gregtech.loaders.misc.GT_BranchDefinition.getTemplate()
- return null;
- }
- }
+ public final IAllele[] getTemplate() {
+ Class gtBranchDefClass;
+ try {
+ gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
+ Enum enumA = mActualValues;
+ Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate");
- public final IClassification getBranch() {
- Class gtBranchDefClass;
- try {
- gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
- Enum enum_MY_SAMPLE_ENUM = mActualValues;
- Method methodMyMethod = gtBranchDefClass.getMethod("getBranch");
-
+ Logger.INFO("[Bees] gtBranchDefClass: " + (gtBranchDefClass != null));
+ Logger.INFO("[Bees] enumA: " + (enumA != null));
+ Logger.INFO("[Bees] methodMyMethod: " + (methodMyMethod != null));
- Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
- Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null));
- Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
-
- return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM);
- }
- catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Logger.INFO("[Bees] Bad Reflection. getBranch()");
- e.printStackTrace();
- return null;
- }
- }
+ return (IAllele[]) methodMyMethod.invoke(enumA);
+ } catch (ClassNotFoundException
+ | NoSuchMethodException
+ | SecurityException
+ | IllegalAccessException
+ | IllegalArgumentException
+ | InvocationTargetException e) {
+ Logger.INFO("[Bees] Bad Reflection. getTemplate()");
+ e.printStackTrace();
+ // gregtech.loaders.misc.GT_BranchDefinition.getTemplate()
+ return null;
+ }
+ }
- private Enum setEnumVar(String value){
- try {
- Class gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
- Enum branchDef = Enum.valueOf(gtBranchDefClass, value);
- return branchDef;
- }
- catch (ClassNotFoundException e){
- return null;
- }
- }
+ public final IClassification getBranch() {
+ Class gtBranchDefClass;
+ try {
+ gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
+ Enum enum_MY_SAMPLE_ENUM = mActualValues;
+ Method methodMyMethod = gtBranchDefClass.getMethod("getBranch");
+ Logger.INFO("[Bees] gtBranchDefClass: " + (gtBranchDefClass != null));
+ Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: " + (enum_MY_SAMPLE_ENUM != null));
+ Logger.INFO("[Bees] methodMyMethod: " + (methodMyMethod != null));
+ return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM);
+ } catch (ClassNotFoundException
+ | NoSuchMethodException
+ | SecurityException
+ | IllegalAccessException
+ | IllegalArgumentException
+ | InvocationTargetException e) {
+ Logger.INFO("[Bees] Bad Reflection. getBranch()");
+ e.printStackTrace();
+ return null;
+ }
+ }
+ private Enum setEnumVar(String value) {
+ try {
+ Class gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition");
+ Enum branchDef = Enum.valueOf(gtBranchDefClass, value);
+ return branchDef;
+ } catch (ClassNotFoundException e) {
+ return null;
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
index 813ebcbe25..3e1c40e972 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
@@ -1,181 +1,279 @@
package gtPlusPlus.xmod.forestry.bees.custom;
-import java.lang.reflect.Field;
-import java.util.List;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-
+import forestry.api.core.Tabs;
import gregtech.GT_Mod;
import gregtech.api.enums.*;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
-
-import forestry.api.core.Tabs;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import java.lang.reflect.Field;
+import java.util.List;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import org.apache.commons.lang3.reflect.FieldUtils;
public class ItemCustomComb extends Item {
- @SideOnly(Side.CLIENT)
- private IIcon secondIcon;
-
- public ItemCustomComb() {
- super();
- this.setCreativeTab(Tabs.tabApiculture);
- this.setHasSubtypes(true);
- this.setUnlocalizedName("gtpp.comb");
- GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID);
- }
-
- public ItemStack getStackForType(CustomCombs type) {
- return new ItemStack(this, 1, type.ordinal());
- }
-
- public ItemStack getStackForType(CustomCombs type, int count) {
- return new ItemStack(this, count, type.ordinal());
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs tabs, List list) {
- for (CustomCombs type : CustomCombs.values()) {
- if (type.showInList) {
- list.add(this.getStackForType(type));
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
-
- @Override
- public int getRenderPasses(int meta) {
- return 2;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister par1IconRegister) {
- this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
- this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return (pass == 0) ? itemIcon : secondIcon;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass) {
- int meta = Math.max(0, Math.min(CustomCombs.values().length - 1, stack.getItemDamage()));
- int colour = CustomCombs.values()[meta].getColours()[0];
-
- if (pass >= 1) {
- colour = CustomCombs.values()[meta].getColours()[1];
- }
-
- return colour;
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack stack) {
- return CustomCombs.values()[stack.getItemDamage()].getName();
- }
-
- public void initCombsRecipes() {
- ItemStack tComb;
-
- tComb = getStackForType(CustomCombs.SILICON);
- addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silicon, 1), 30);
- //addProcess(tComb, Materials.Silver, 100);
- //addProcess(tComb, Materials.Galena, 100);
-
- //Rubbers
- tComb = getStackForType(CustomCombs.RUBBER);
- addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rubber, 1), 30);
- tComb = getStackForType(CustomCombs.PLASTIC);
- addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), 20);
- tComb = getStackForType(CustomCombs.PTFE);
- addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PTFE, 1), 10);
- tComb = getStackForType(CustomCombs.PBS);
- addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PBS, 1), 5);
-
-
- //Fuels
- tComb = getStackForType(CustomCombs.BIOMASS);
- addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropBiomassBlob), 5);
- tComb = getStackForType(CustomCombs.PBS);
- addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropEthanolBlob), 5);
-
- //Misc Materials
- tComb = getStackForType(CustomCombs.FORCE);
- addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropForceGem), 5);
- tComb = getStackForType(CustomCombs.FLUORINE);
- addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropFluorineBlob), 5);
- tComb = getStackForType(CustomCombs.NIKOLITE);
- addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropNikoliteDust), 5);
-
- }
- public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance){
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5);
- //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
- }
-
- public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100 }, 128, 5);
- //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f));
- }
-
- public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2, ItemStack aOutput3, int chance3){
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, aOutput3, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100, chance3*100 }, 128, 5);
- //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f,aOutput3,chance3*0.01f));
- }
-
- public void addProcess(ItemStack tComb, Materials aMaterial, int chance){
- if(tryGetNerfBoolean()){
- GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96);
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384);
- }else{
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5);
- //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
- }
- }
-
- public void addProcess(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){
- if(tryGetNerfBoolean()){
- GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), Materials.Water.getFluid(1000), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 96);
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 1), 10000, (int) (aOutMaterial.getMass() * 128), 384);
- }else{
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5);
- //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
- }
- }
-
- private static boolean tryGetNerfBoolean(){
- try {
- Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy");
- Field mNerf = FieldUtils.getDeclaredField(mProxy, "mNerfedCombs", true);
- boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy);
- return returnValue;
- }
- catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
- return false;
- }
- }
-
-} \ No newline at end of file
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
+
+ public ItemCustomComb() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gtpp.comb");
+ GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID);
+ }
+
+ public ItemStack getStackForType(CustomCombs type) {
+ return new ItemStack(this, 1, type.ordinal());
+ }
+
+ public ItemStack getStackForType(CustomCombs type, int count) {
+ return new ItemStack(this, count, type.ordinal());
+ }
+
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs tabs, List list) {
+ for (CustomCombs type : CustomCombs.values()) {
+ if (type.showInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
+
+ @Override
+ public int getRenderPasses(int meta) {
+ return 2;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
+ this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return (pass == 0) ? itemIcon : secondIcon;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ int meta = Math.max(0, Math.min(CustomCombs.values().length - 1, stack.getItemDamage()));
+ int colour = CustomCombs.values()[meta].getColours()[0];
+
+ if (pass >= 1) {
+ colour = CustomCombs.values()[meta].getColours()[1];
+ }
+
+ return colour;
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return CustomCombs.values()[stack.getItemDamage()].getName();
+ }
+
+ public void initCombsRecipes() {
+ ItemStack tComb;
+
+ tComb = getStackForType(CustomCombs.SILICON);
+ addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silicon, 1), 30);
+ // addProcess(tComb, Materials.Silver, 100);
+ // addProcess(tComb, Materials.Galena, 100);
+
+ // Rubbers
+ tComb = getStackForType(CustomCombs.RUBBER);
+ addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rubber, 1), 30);
+ tComb = getStackForType(CustomCombs.PLASTIC);
+ addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), 20);
+ tComb = getStackForType(CustomCombs.PTFE);
+ addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PTFE, 1), 10);
+ tComb = getStackForType(CustomCombs.PBS);
+ addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PBS, 1), 5);
+
+ // Fuels
+ tComb = getStackForType(CustomCombs.BIOMASS);
+ addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropBiomassBlob), 5);
+ tComb = getStackForType(CustomCombs.PBS);
+ addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropEthanolBlob), 5);
+
+ // Misc Materials
+ tComb = getStackForType(CustomCombs.FORCE);
+ addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropForceGem), 5);
+ tComb = getStackForType(CustomCombs.FLUORINE);
+ addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropFluorineBlob), 5);
+ tComb = getStackForType(CustomCombs.NIKOLITE);
+ addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropNikoliteDust), 5);
+ }
+
+ public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance) {
+ GT_Values.RA.addCentrifugeRecipe(
+ tComb,
+ GT_Values.NI,
+ GT_Values.NF,
+ GT_Values.NF,
+ aOutput,
+ ItemList.FR_Wax.get(1, new Object[0]),
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ new int[] {chance * 100, 3000},
+ 128,
+ 5);
+ // RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f,
+ // ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ }
+
+ public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2) {
+ GT_Values.RA.addCentrifugeRecipe(
+ tComb,
+ GT_Values.NI,
+ GT_Values.NF,
+ GT_Values.NF,
+ aOutput,
+ ItemList.FR_Wax.get(1, new Object[0]),
+ aOutput2,
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ new int[] {chance * 100, 3000, chance2 * 100},
+ 128,
+ 5);
+ // RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f,
+ // ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f));
+ }
+
+ public void addSpecialCent(
+ ItemStack tComb,
+ ItemStack aOutput,
+ int chance,
+ ItemStack aOutput2,
+ int chance2,
+ ItemStack aOutput3,
+ int chance3) {
+ GT_Values.RA.addCentrifugeRecipe(
+ tComb,
+ GT_Values.NI,
+ GT_Values.NF,
+ GT_Values.NF,
+ aOutput,
+ ItemList.FR_Wax.get(1, new Object[0]),
+ aOutput2,
+ aOutput3,
+ GT_Values.NI,
+ GT_Values.NI,
+ new int[] {chance * 100, 3000, chance2 * 100, chance3 * 100},
+ 128,
+ 5);
+ // RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f,
+ // ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f,aOutput3,chance3*0.01f));
+ }
+
+ public void addProcess(ItemStack tComb, Materials aMaterial, int chance) {
+ if (tryGetNerfBoolean()) {
+ GT_Values.RA.addChemicalRecipe(
+ GT_Utility.copyAmount(9, tComb),
+ GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1),
+ Materials.Water.getFluid(1000),
+ aMaterial.mOreByProducts.isEmpty()
+ ? null
+ : aMaterial.mOreByProducts.get(0).getMolten(144),
+ GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4),
+ 96);
+ GT_Values.RA.addAutoclaveRecipe(
+ GT_Utility.copyAmount(16, tComb),
+ Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + 9) / 10))),
+ GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1),
+ 10000,
+ (int) (aMaterial.getMass() * 128),
+ 384);
+ } else {
+ GT_Values.RA.addCentrifugeRecipe(
+ tComb,
+ GT_Values.NI,
+ GT_Values.NF,
+ GT_Values.NF,
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1),
+ ItemList.FR_Wax.get(1, new Object[0]),
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ new int[] {chance * 100, 3000},
+ 128,
+ 5);
+ // RecipeManagers.centrifugeManager.addRecipe(40, tComb,
+ // ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), chance * 0.01f,
+ // ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ }
+ }
+
+ public void addProcess(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance) {
+ if (tryGetNerfBoolean()) {
+ GT_Values.RA.addChemicalRecipe(
+ GT_Utility.copyAmount(9, tComb),
+ GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1),
+ Materials.Water.getFluid(1000),
+ aInMaterial.mOreByProducts.isEmpty()
+ ? null
+ : aInMaterial.mOreByProducts.get(0).getMolten(144),
+ GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4),
+ 96);
+ GT_Values.RA.addAutoclaveRecipe(
+ GT_Utility.copyAmount(16, tComb),
+ Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass() + 9) / 10))),
+ GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 1),
+ 10000,
+ (int) (aOutMaterial.getMass() * 128),
+ 384);
+ } else {
+ GT_Values.RA.addCentrifugeRecipe(
+ tComb,
+ GT_Values.NI,
+ GT_Values.NF,
+ GT_Values.NF,
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1),
+ ItemList.FR_Wax.get(1, new Object[0]),
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ GT_Values.NI,
+ new int[] {chance * 100, 3000},
+ 128,
+ 5);
+ // RecipeManagers.centrifugeManager.addRecipe(40, tComb,
+ // ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), chance * 0.01f,
+ // ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ }
+ }
+
+ private static boolean tryGetNerfBoolean() {
+ try {
+ Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy");
+ Field mNerf = FieldUtils.getDeclaredField(mProxy, "mNerfedCombs", true);
+ boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy);
+ return returnValue;
+ } catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java
index 4aa9de8220..3132cddc01 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java
@@ -10,34 +10,32 @@
******************************************************************************/
package gtPlusPlus.xmod.forestry.bees.gui;
-import net.minecraft.entity.player.InventoryPlayer;
-
import forestry.apiculture.gui.ContainerBeeHelper;
import forestry.apiculture.gui.IContainerBeeHousing;
import forestry.apiculture.tiles.TileBeeHousingBase;
import forestry.core.gui.ContainerTile;
import forestry.core.network.IForestryPacketClient;
import forestry.core.network.packets.PacketGuiUpdate;
+import net.minecraft.entity.player.InventoryPlayer;
public class ContainerBeeHouse extends ContainerTile<TileBeeHousingBase> implements IContainerBeeHousing {
- public ContainerBeeHouse(InventoryPlayer player, TileBeeHousingBase tile, boolean hasFrames) {
- super(tile, player, 8, 108);
- ContainerBeeHelper.addSlots(this, tile, hasFrames);
- }
-
- private int beeProgress = 0;
+ public ContainerBeeHouse(InventoryPlayer player, TileBeeHousingBase tile, boolean hasFrames) {
+ super(tile, player, 8, 108);
+ ContainerBeeHelper.addSlots(this, tile, hasFrames);
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
+ private int beeProgress = 0;
- int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent();
- if (this.beeProgress != beeProgress) {
- this.beeProgress = beeProgress;
- IForestryPacketClient packet = new PacketGuiUpdate(tile);
- sendPacketToCrafters(packet);
- }
- }
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent();
+ if (this.beeProgress != beeProgress) {
+ this.beeProgress = beeProgress;
+ IForestryPacketClient packet = new PacketGuiUpdate(tile);
+ sendPacketToCrafters(packet);
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java
index 89a2f121d9..5c0287628e 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java
@@ -10,44 +10,47 @@
******************************************************************************/
package gtPlusPlus.xmod.forestry.bees.gui;
-import net.minecraft.inventory.Container;
-
import forestry.apiculture.gui.IContainerBeeHousing;
import forestry.apiculture.gui.IGuiBeeHousingInventory;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
import forestry.core.render.EnumTankLevel;
+import net.minecraft.inventory.Container;
-public class GuiBeeHouse<C extends Container & IContainerBeeHousing> extends GuiForestryTitled<C, IGuiBeeHousingInventory> {
-
- public enum Icon {
- APIARY("/apiary.png"),
- BEE_HOUSE("/alveary.png");
+public class GuiBeeHouse<C extends Container & IContainerBeeHousing>
+ extends GuiForestryTitled<C, IGuiBeeHousingInventory> {
- private final String path;
+ public enum Icon {
+ APIARY("/apiary.png"),
+ BEE_HOUSE("/alveary.png");
- Icon(String path) {
- this.path = path;
- }
- }
+ private final String path;
- public GuiBeeHouse(IGuiBeeHousingInventory tile, C container, Icon icon) {
- super(Constants.TEXTURE_PATH_GUI + icon.path, container, tile);
- ySize = 190;
- }
+ Icon(String path) {
+ this.path = path;
+ }
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
+ public GuiBeeHouse(IGuiBeeHousingInventory tile, C container, Icon icon) {
+ super(Constants.TEXTURE_PATH_GUI + icon.path, container, tile);
+ ySize = 190;
+ }
- drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100)));
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
+ super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
- private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
- int i = 176 + rated.getLevelScaled(16);
- int k = 0;
+ drawHealthMeter(
+ guiLeft + 20,
+ guiTop + 37,
+ inventory.getHealthScaled(46),
+ EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100)));
+ }
- this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height);
- }
+ private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
+ int i = 176 + rated.getLevelScaled(16);
+ int k = 0;
+ this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height);
+ }
}
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 488ef2ea0b..196d0c8fe9 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
@@ -7,51 +7,50 @@ 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);
- }
+ 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
index 60b8a18e48..069bd86ff4 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
@@ -7,35 +7,34 @@ 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);
+ }
- 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.mID = aID;
this.mName = aName;
- this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", "");
+ this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", "");
this.mShowInList = aShow;
this.mColour = aColour;
- map(aID, this);
- this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", ""));
+ map(aID, this);
+ this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", ""));
}
public void setHidden() {
@@ -50,7 +49,7 @@ public enum GTPP_DropType {
return mColour;
}
- public ItemStack getStackForType(int count) {
- return new ItemStack(GTPP_Bees.drop, count, mID);
- }
+ 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
index 70dae45d06..d275328194 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
@@ -7,49 +7,48 @@ 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);
- }
+ 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
index 20e4f31008..00df14a3bc 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
@@ -7,35 +7,34 @@ 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;
+ public boolean mShowInList;
+ public Material mMaterial;
+ public int mChance;
+ public int mID;
- private String mName;
- private String mNameUnlocal;
- private int mColour;
+ 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 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.mID = aID;
this.mName = aName;
- this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", "");
+ this.mNameUnlocal = aName.toLowerCase().replaceAll(" ", "");
this.mShowInList = aShow;
this.mColour = aColour;
- map(aID, this);
- this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", ""));
+ map(aID, this);
+ this.mMaterial = GTPP_Bees.sMaterialMappings.get(aName.toLowerCase().replaceAll(" ", ""));
}
public void setHidden() {
@@ -50,7 +49,7 @@ public enum GTPP_PropolisType {
return mColour;
}
- public ItemStack getStackForType(int count) {
- return new ItemStack(GTPP_Bees.propolis, count, mID);
- }
+ public ItemStack getStackForType(int count) {
+ return new ItemStack(GTPP_Bees.propolis, count, mID);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
index 47c380fdfe..86b1184c6c 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
@@ -10,85 +10,83 @@
******************************************************************************/
package gtPlusPlus.xmod.forestry.bees.inventory;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
import forestry.api.apiculture.*;
import forestry.apiculture.InventoryBeeHousing;
import forestry.apiculture.inventory.IApiaryInventory;
import forestry.core.access.IAccessHandler;
import forestry.core.utils.SlotUtil;
+import java.util.ArrayList;
+import java.util.Collection;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory {
- public static final int SLOT_FRAMES_1 = 9;
- public static final int SLOT_FRAMES_COUNT = 3;
-
- public InventoryDenseBeeHouse(IAccessHandler accessHandler) {
- super(12, accessHandler);
- }
-
- @Override
- public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
- if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
- return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null);
- }
-
- return super.canSlotAccept(slotIndex, itemStack);
- }
-
- // override for pipe automation
- @Override
- public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
- if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
- return false;
- }
- return super.isItemValidForSlot(slotIndex, itemStack);
- }
-
- public Collection<IHiveFrame> getFrames() {
- Collection<IHiveFrame> hiveFrames = new ArrayList<>(SLOT_FRAMES_COUNT);
-
- for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
- ItemStack stackInSlot = getStackInSlot(i);
- if (stackInSlot == null) {
- continue;
- }
-
- Item itemInSlot = stackInSlot.getItem();
- if (itemInSlot instanceof IHiveFrame) {
- hiveFrames.add((IHiveFrame) itemInSlot);
- }
- }
-
- return hiveFrames;
- }
-
- @Override
- public void wearOutFrames(IBeeHousing beeHousing, int amount) {
- IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld());
- int wear = Math.round(amount * beekeepingMode.getWearModifier());
-
- for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
- ItemStack hiveFrameStack = getStackInSlot(i);
- if (hiveFrameStack == null) {
- continue;
- }
-
- Item hiveFrameItem = hiveFrameStack.getItem();
- if (!(hiveFrameItem instanceof IHiveFrame)) {
- continue;
- }
-
- IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem;
-
- ItemStack queenStack = getQueen();
- IBee queen = BeeManager.beeRoot.getMember(queenStack);
- ItemStack usedFrame = hiveFrame.frameUsed(beeHousing, hiveFrameStack, queen, wear);
-
- setInventorySlotContents(i, usedFrame);
- }
- }
+ public static final int SLOT_FRAMES_1 = 9;
+ public static final int SLOT_FRAMES_COUNT = 3;
+
+ public InventoryDenseBeeHouse(IAccessHandler accessHandler) {
+ super(12, accessHandler);
+ }
+
+ @Override
+ public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
+ if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
+ return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null);
+ }
+
+ return super.canSlotAccept(slotIndex, itemStack);
+ }
+
+ // override for pipe automation
+ @Override
+ public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
+ if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
+ return false;
+ }
+ return super.isItemValidForSlot(slotIndex, itemStack);
+ }
+
+ public Collection<IHiveFrame> getFrames() {
+ Collection<IHiveFrame> hiveFrames = new ArrayList<>(SLOT_FRAMES_COUNT);
+
+ for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
+ ItemStack stackInSlot = getStackInSlot(i);
+ if (stackInSlot == null) {
+ continue;
+ }
+
+ Item itemInSlot = stackInSlot.getItem();
+ if (itemInSlot instanceof IHiveFrame) {
+ hiveFrames.add((IHiveFrame) itemInSlot);
+ }
+ }
+
+ return hiveFrames;
+ }
+
+ @Override
+ public void wearOutFrames(IBeeHousing beeHousing, int amount) {
+ IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld());
+ int wear = Math.round(amount * beekeepingMode.getWearModifier());
+
+ for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
+ ItemStack hiveFrameStack = getStackInSlot(i);
+ if (hiveFrameStack == null) {
+ continue;
+ }
+
+ Item hiveFrameItem = hiveFrameStack.getItem();
+ if (!(hiveFrameItem instanceof IHiveFrame)) {
+ continue;
+ }
+
+ IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem;
+
+ ItemStack queenStack = getQueen();
+ IBee queen = BeeManager.beeRoot.getMember(queenStack);
+ ItemStack usedFrame = hiveFrame.frameUsed(beeHousing, hiveFrameStack, queen, wear);
+
+ setInventorySlotContents(i, usedFrame);
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java
index e1d37ab463..00062dc0ec 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java
@@ -9,99 +9,120 @@
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package gtPlusPlus.xmod.forestry.bees.items;
+
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.registry.GameRegistry;
-
+import forestry.core.utils.StringUtil;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.LoadedMods;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
-
-import forestry.core.utils.StringUtil;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.lib.LoadedMods;
import net.minecraftforge.common.ChestGenHooks;
public class FR_ItemRegistry {
+ // ----- Apiary Frames ----------------------
+ // public static FR_ItemHiveFrame frameUntreated;
+ // public static FR_ItemHiveFrame frameImpregnated;
+ // public static FR_ItemHiveFrame frameProven;
- //----- Apiary Frames ----------------------
- //public static FR_ItemHiveFrame frameUntreated;
- //public static FR_ItemHiveFrame frameImpregnated;
- //public static FR_ItemHiveFrame frameProven;
+ // Magic Bee Frame Items
+ public static MB_ItemFrame hiveFrameAccelerated;
+ public static MB_ItemFrame hiveFrameVoid;
+ public static MB_ItemFrame hiveFrameMutagenic;
+ public static MB_ItemFrame hiveFrameBusy;
- //Magic Bee Frame Items
- public static MB_ItemFrame hiveFrameAccelerated;
- public static MB_ItemFrame hiveFrameVoid;
- public static MB_ItemFrame hiveFrameMutagenic;
- public static MB_ItemFrame hiveFrameBusy;
+ // Extra Bee Frame Items
+ public static MB_ItemFrame hiveFrameCocoa;
+ public static MB_ItemFrame hiveFrameCaged;
+ public static MB_ItemFrame hiveFrameSoul;
+ public static MB_ItemFrame hiveFrameClay;
+ public static MB_ItemFrame hiveFrameNova;
- //Extra Bee Frame Items
- public static MB_ItemFrame hiveFrameCocoa;
- public static MB_ItemFrame hiveFrameCaged;
- public static MB_ItemFrame hiveFrameSoul;
- public static MB_ItemFrame hiveFrameClay;
- public static MB_ItemFrame hiveFrameNova;
-
- // Frame Items added by bartimaeusnek
- public static MB_ItemFrame hiveFrameDecay;
- public static MB_ItemFrame hiveFrameSlow;
- public static MB_ItemFrame hiveFrameStalilize;
- public static MB_ItemFrame hiveFrameArborist;
-
- @Optional.Method(modid = "Forestry")
- public static void Register() {
+ // Frame Items added by bartimaeusnek
+ public static MB_ItemFrame hiveFrameDecay;
+ public static MB_ItemFrame hiveFrameSlow;
+ public static MB_ItemFrame hiveFrameStalilize;
+ public static MB_ItemFrame hiveFrameArborist;
- //Forestry Frames
- //frameUntreated = registerItem(new FR_ItemHiveFrame(80, 0.9f), "frameUntreated");
- //frameImpregnated = registerItem(new FR_ItemHiveFrame(240, 0.4f), "frameImpregnated");
- //frameProven = registerItem(new FR_ItemHiveFrame(720, 0.3f), "frameProven");
+ @Optional.Method(modid = "Forestry")
+ public static void Register() {
- //Magic Bee like Frames
-
- if (!CORE.GTNH) {
- hiveFrameVoid = new MB_ItemFrame(MB_FrameType.VOID, EnumRarity.rare, "Makes your bee die in the blink of an eye.");
- }
- else {
- hiveFrameVoid = new MB_ItemFrame(MB_FrameType.USELESS, EnumRarity.common, "No more cheaty frames for GTNH players.");
- }
-
- hiveFrameAccelerated = new MB_ItemFrame(MB_FrameType.ACCELERATED, "Longevity for bees isn't very common, especially if they're working harder.");
- hiveFrameMutagenic = new MB_ItemFrame(MB_FrameType.MUTAGENIC, EnumRarity.epic, "Evolution of the fittest, finest and fastest.");
- hiveFrameBusy = new MB_ItemFrame(MB_FrameType.BUSY, "Your bee will work harder and longer than you expected.");
- ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14));
- ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 3, 18));
- ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14));
- ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 9));
- ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 1, 9));
- ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12));
- ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 8));
- ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12));
+ // Forestry Frames
+ // frameUntreated = registerItem(new FR_ItemHiveFrame(80, 0.9f), "frameUntreated");
+ // frameImpregnated = registerItem(new FR_ItemHiveFrame(240, 0.4f), "frameImpregnated");
+ // frameProven = registerItem(new FR_ItemHiveFrame(720, 0.3f), "frameProven");
- //Extra Bee like Frames
- if (!LoadedMods.ExtraBees){
- hiveFrameCocoa = new MB_ItemFrame(MB_FrameType.COCOA, EnumRarity.common, "");
- hiveFrameCaged = new MB_ItemFrame(MB_FrameType.CAGE, EnumRarity.common, "");
- hiveFrameSoul = new MB_ItemFrame(MB_FrameType.SOUL, EnumRarity.common, "");
- hiveFrameClay = new MB_ItemFrame(MB_FrameType.CLAY, EnumRarity.common, "");
- hiveFrameNova = new MB_ItemFrame(MB_FrameType.NOVA, EnumRarity.epic, "A Creative Only Frame.");
- }
-
- // Frame Items added by bartimaeusnek
- hiveFrameDecay = new MB_ItemFrame(MB_FrameType.DECAYING, EnumRarity.uncommon, "Who really needs stable genetics?");
- hiveFrameSlow = new MB_ItemFrame(MB_FrameType.SLOWING, EnumRarity.common, "The journey is its own reward.");
- hiveFrameStalilize = new MB_ItemFrame(MB_FrameType.STABILIZING, EnumRarity.rare, "If you wish your bees to keep their form.");
- hiveFrameArborist = new MB_ItemFrame(MB_FrameType.ARBORISTS, EnumRarity.common, "Who need Bees when you can have Trees?");
- ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameArborist), 1, 4, 24));
- ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameSlow), 1, 4, 24));
- }
+ // Magic Bee like Frames
- protected static <T extends Item> T registerItem(final T item, final String name) {
- item.setUnlocalizedName(name);
- GameRegistry.registerItem(item, StringUtil.cleanItemName(item));
- return item;
- }
+ if (!CORE.GTNH) {
+ hiveFrameVoid =
+ new MB_ItemFrame(MB_FrameType.VOID, EnumRarity.rare, "Makes your bee die in the blink of an eye.");
+ } else {
+ hiveFrameVoid = new MB_ItemFrame(
+ MB_FrameType.USELESS, EnumRarity.common, "No more cheaty frames for GTNH players.");
+ }
-}
+ hiveFrameAccelerated = new MB_ItemFrame(
+ MB_FrameType.ACCELERATED,
+ "Longevity for bees isn't very common, especially if they're working harder.");
+ hiveFrameMutagenic = new MB_ItemFrame(
+ MB_FrameType.MUTAGENIC, EnumRarity.epic, "Evolution of the fittest, finest and fastest.");
+ hiveFrameBusy = new MB_ItemFrame(MB_FrameType.BUSY, "Your bee will work harder and longer than you expected.");
+ ChestGenHooks.addItem(
+ ChestGenHooks.STRONGHOLD_CORRIDOR,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14));
+ ChestGenHooks.addItem(
+ ChestGenHooks.STRONGHOLD_LIBRARY,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 3, 18));
+ ChestGenHooks.addItem(
+ ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14));
+ ChestGenHooks.addItem(
+ ChestGenHooks.MINESHAFT_CORRIDOR,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 9));
+ ChestGenHooks.addItem(
+ ChestGenHooks.PYRAMID_DESERT_CHEST,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 1, 9));
+ ChestGenHooks.addItem(
+ ChestGenHooks.PYRAMID_JUNGLE_CHEST,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12));
+ ChestGenHooks.addItem(
+ ChestGenHooks.MINESHAFT_CORRIDOR,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 8));
+ ChestGenHooks.addItem(
+ ChestGenHooks.DUNGEON_CHEST,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12));
+
+ // Extra Bee like Frames
+ if (!LoadedMods.ExtraBees) {
+ hiveFrameCocoa = new MB_ItemFrame(MB_FrameType.COCOA, EnumRarity.common, "");
+ hiveFrameCaged = new MB_ItemFrame(MB_FrameType.CAGE, EnumRarity.common, "");
+ hiveFrameSoul = new MB_ItemFrame(MB_FrameType.SOUL, EnumRarity.common, "");
+ hiveFrameClay = new MB_ItemFrame(MB_FrameType.CLAY, EnumRarity.common, "");
+ hiveFrameNova = new MB_ItemFrame(MB_FrameType.NOVA, EnumRarity.epic, "A Creative Only Frame.");
+ }
+ // Frame Items added by bartimaeusnek
+ hiveFrameDecay =
+ new MB_ItemFrame(MB_FrameType.DECAYING, EnumRarity.uncommon, "Who really needs stable genetics?");
+ hiveFrameSlow = new MB_ItemFrame(MB_FrameType.SLOWING, EnumRarity.common, "The journey is its own reward.");
+ hiveFrameStalilize = new MB_ItemFrame(
+ MB_FrameType.STABILIZING, EnumRarity.rare, "If you wish your bees to keep their form.");
+ hiveFrameArborist =
+ new MB_ItemFrame(MB_FrameType.ARBORISTS, EnumRarity.common, "Who need Bees when you can have Trees?");
+ ChestGenHooks.addItem(
+ ChestGenHooks.PYRAMID_JUNGLE_CHEST,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameArborist), 1, 4, 24));
+ ChestGenHooks.addItem(
+ ChestGenHooks.STRONGHOLD_LIBRARY,
+ new WeightedRandomChestContent(new ItemStack(hiveFrameSlow), 1, 4, 24));
+ }
+ protected static <T extends Item> T registerItem(final T item, final String name) {
+ item.setUnlocalizedName(name);
+ GameRegistry.registerItem(item, StringUtil.cleanItemName(item));
+ return item;
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java
index e075bf1eda..4312e36714 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java
@@ -2,23 +2,18 @@ package gtPlusPlus.xmod.forestry.bees.items;
import net.minecraft.util.StatCollector;
-public class FR_StringUtil
-{
- public static String getLocalizedString(final String key)
- {
- if(StatCollector.canTranslate(key))
- {
- return StatCollector.translateToLocal(key);
- }
- return StatCollector.translateToFallback(key);
- }
+public class FR_StringUtil {
+ public static String getLocalizedString(final String key) {
+ if (StatCollector.canTranslate(key)) {
+ return StatCollector.translateToLocal(key);
+ }
+ return StatCollector.translateToFallback(key);
+ }
- public static String getLocalizedString(final String key, final Object... objects)
- {
- if(StatCollector.canTranslate(key))
- {
- return String.format(StatCollector.translateToLocal(key), objects);
- }
- return String.format(StatCollector.translateToFallback(key), objects);
- }
+ public static String getLocalizedString(final String key, final Object... objects) {
+ if (StatCollector.canTranslate(key)) {
+ return String.format(StatCollector.translateToLocal(key), objects);
+ }
+ return String.format(StatCollector.translateToFallback(key), objects);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java
index 1016021e44..dcbb8b94a1 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java
@@ -3,124 +3,136 @@ package gtPlusPlus.xmod.forestry.bees.items;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeModifier;
-public enum MB_FrameType implements IBeeModifier
-{
- //ExtraBees Clone Frames
- //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f)
- COCOA("Chocolate", 240, 1.0f, 1.0f, 0.50f, 1.50f, 1f),
- CAGE("Restraint", 240, 0.5f, 1.0f, 0.75f, 0.75f, 1f),
- SOUL("Soul", 80, 1.0f, 1.5f, 0.75f, 0.25f, 1f),
- CLAY("Healing", 240, 1.0f, 0.5f, 1.50f, 0.75f, 1f),
- NOVA("Nova", 240, 1.0f, 100.0f, 0.0001f, 1.00f, 1f),
-
-
- //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f)
- ACCELERATED("Accelerated", 175, 1f, 1.2f, 0.9f, 1.8f, 1f),
- VOID("Void", 20, 1f, 1f, 0.0001f, 10f, 1f),
- MUTAGENIC("Mutagenic", 3, 1f, 5f, 0.0001f, 10f, 1f),
- BUSY("Busy", 2000, 1f, 0f, 3f, 4f, 1f),
- USELESS("Useless", 100, 1f, 0f, 1f, 1f, 1f),
-
- // Frame Items added by bartimaeusnek
- DECAYING("Decaying", 240, 1f, 1f, 1f, 1f, 10f), //enhanches decay to 10x
- SLOWING("Slowing", 175, 1f, 0.5f, 2f, 0.5f, 1f), //reduces mutation, production rate and enhanches lifespan
- STABILIZING("Stabilizing", 60, 1f, 0.1f, 1f, 0.1f, 0.5f), //reduces mutation, production and decay
- ARBORISTS("Arborists", 240, 3f, 0f, 3f, 0f, 1f); //3x territory and lifespan, sets mutation and production to zero
-
- private final String frameName;
- public final int maxDamage;
-
- private final float territoryMod;
- private final float mutationMod;
- private final float lifespanMod;
- private final float productionMod;
- private final float floweringMod;
- private final float geneticDecayMod;
- private final boolean isSealed;
- private final boolean isLit;
- private final boolean isSunlit;
- private final boolean isHellish;
-
- MB_FrameType(final String name, final int damage, final float territory, final float mutation, final float lifespan, final float production, final float geneticDecay) {
- this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false);
- }
-
- MB_FrameType(final String name, final int damage,
- final float territory, final float mutation, final float lifespan, final float production, final float flowering, final float geneticDecay,
- final boolean sealed, final boolean lit, final boolean sunlit, final boolean hellish)
- {
- this.frameName = name;
- this.maxDamage = damage;
-
- this.territoryMod = territory;
- this.mutationMod = mutation;
- this.lifespanMod = lifespan;
- this.productionMod = production;
- this.floweringMod = flowering;
- this.geneticDecayMod = geneticDecay;
- this.isSealed = sealed;
- this.isLit = lit;
- this.isSunlit = sunlit;
- this.isHellish = hellish;
- }
-
- public String getName()
- {
- return this.frameName;
- }
-
- public String getLocalizedName()
- {
- return FR_StringUtil.getLocalizedString("frame." + this.frameName);
- }
-
- @Override
- public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) {
- return this.territoryMod;
- }
-
- @Override
- public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
- return this.mutationMod;
- }
-
- @Override
- public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
- return this.lifespanMod;
- }
-
- @Override
- public float getProductionModifier(final IBeeGenome genome, final float currentModifier) {
- return this.productionMod;
- }
-
- @Override
- public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) {
- return this.floweringMod;
- }
-
- @Override
- public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) {
- return this.geneticDecayMod;
- }
-
- @Override
- public boolean isSealed() {
- return this.isSealed;
- }
-
- @Override
- public boolean isSelfLighted() {
- return this.isLit;
- }
-
- @Override
- public boolean isSunlightSimulated() {
- return this.isSunlit;
- }
-
- @Override
- public boolean isHellish() {
- return this.isHellish;
- }
+public enum MB_FrameType implements IBeeModifier {
+ // ExtraBees Clone Frames
+ // Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f)
+ COCOA("Chocolate", 240, 1.0f, 1.0f, 0.50f, 1.50f, 1f),
+ CAGE("Restraint", 240, 0.5f, 1.0f, 0.75f, 0.75f, 1f),
+ SOUL("Soul", 80, 1.0f, 1.5f, 0.75f, 0.25f, 1f),
+ CLAY("Healing", 240, 1.0f, 0.5f, 1.50f, 0.75f, 1f),
+ NOVA("Nova", 240, 1.0f, 100.0f, 0.0001f, 1.00f, 1f),
+
+ // Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f)
+ ACCELERATED("Accelerated", 175, 1f, 1.2f, 0.9f, 1.8f, 1f),
+ VOID("Void", 20, 1f, 1f, 0.0001f, 10f, 1f),
+ MUTAGENIC("Mutagenic", 3, 1f, 5f, 0.0001f, 10f, 1f),
+ BUSY("Busy", 2000, 1f, 0f, 3f, 4f, 1f),
+ USELESS("Useless", 100, 1f, 0f, 1f, 1f, 1f),
+
+ // Frame Items added by bartimaeusnek
+ DECAYING("Decaying", 240, 1f, 1f, 1f, 1f, 10f), // enhanches decay to 10x
+ SLOWING("Slowing", 175, 1f, 0.5f, 2f, 0.5f, 1f), // reduces mutation, production rate and enhanches lifespan
+ STABILIZING("Stabilizing", 60, 1f, 0.1f, 1f, 0.1f, 0.5f), // reduces mutation, production and decay
+ ARBORISTS("Arborists", 240, 3f, 0f, 3f, 0f, 1f); // 3x territory and lifespan, sets mutation and production to zero
+
+ private final String frameName;
+ public final int maxDamage;
+
+ private final float territoryMod;
+ private final float mutationMod;
+ private final float lifespanMod;
+ private final float productionMod;
+ private final float floweringMod;
+ private final float geneticDecayMod;
+ private final boolean isSealed;
+ private final boolean isLit;
+ private final boolean isSunlit;
+ private final boolean isHellish;
+
+ MB_FrameType(
+ final String name,
+ final int damage,
+ final float territory,
+ final float mutation,
+ final float lifespan,
+ final float production,
+ final float geneticDecay) {
+ this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false);
+ }
+
+ MB_FrameType(
+ final String name,
+ final int damage,
+ final float territory,
+ final float mutation,
+ final float lifespan,
+ final float production,
+ final float flowering,
+ final float geneticDecay,
+ final boolean sealed,
+ final boolean lit,
+ final boolean sunlit,
+ final boolean hellish) {
+ this.frameName = name;
+ this.maxDamage = damage;
+
+ this.territoryMod = territory;
+ this.mutationMod = mutation;
+ this.lifespanMod = lifespan;
+ this.productionMod = production;
+ this.floweringMod = flowering;
+ this.geneticDecayMod = geneticDecay;
+ this.isSealed = sealed;
+ this.isLit = lit;
+ this.isSunlit = sunlit;
+ this.isHellish = hellish;
+ }
+
+ public String getName() {
+ return this.frameName;
+ }
+
+ public String getLocalizedName() {
+ return FR_StringUtil.getLocalizedString("frame." + this.frameName);
+ }
+
+ @Override
+ public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.territoryMod;
+ }
+
+ @Override
+ public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
+ return this.mutationMod;
+ }
+
+ @Override
+ public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
+ return this.lifespanMod;
+ }
+
+ @Override
+ public float getProductionModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.productionMod;
+ }
+
+ @Override
+ public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.floweringMod;
+ }
+
+ @Override
+ public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) {
+ return this.geneticDecayMod;
+ }
+
+ @Override
+ public boolean isSealed() {
+ return this.isSealed;
+ }
+
+ @Override
+ public boolean isSelfLighted() {
+ return this.isLit;
+ }
+
+ @Override
+ public boolean isSunlightSimulated() {
+ return this.isSunlit;
+ }
+
+ @Override
+ public boolean isHellish() {
+ return this.isHellish;
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java
index 65b6977b8a..db2a8e317f 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java
@@ -1,11 +1,12 @@
package gtPlusPlus.xmod.forestry.bees.items;
-import java.util.List;
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
+import forestry.api.apiculture.*;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -13,131 +14,121 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import forestry.api.apiculture.*;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-
-public class MB_ItemFrame extends Item implements IHiveFrame
-{
- private final MB_FrameType type;
- private EnumRarity rarity_value = EnumRarity.uncommon;
- private final String toolTip;
-
- public MB_ItemFrame(final MB_FrameType frameType, final String description)
- {
- this(frameType, EnumRarity.uncommon, description);
- }
-
- public MB_ItemFrame(final MB_FrameType frameType, final EnumRarity rarity, final String description)
- {
- super();
- this.type = frameType;
- this.setMaxDamage(this.type.maxDamage);
- this.setMaxStackSize(1);
- this.setCreativeTab(AddToCreativeTab.tabMisc);
- this.setUnlocalizedName("frame" + frameType.getName());
- this.rarity_value = rarity;
- this.toolTip = description;
- GameRegistry.registerItem(this, "frame" + frameType.getName());
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- if ((this.toolTip != "") || !this.toolTip.equals("")){
- list.add(EnumChatFormatting.GRAY+this.toolTip);
- }
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(final IIconRegister par1IconRegister)
- {
- this.itemIcon = par1IconRegister.registerIcon(CORE.MODID + ":frame" + this.type.getName());
- }
-
- // --------- IHiveFrame functions -----------------------------------------
-
- @Override
- public ItemStack frameUsed(final IBeeHousing housing, ItemStack frame, final IBee queen, final int wear) {
- frame.setItemDamage(frame.getItemDamage() + wear);
-
- if (frame.getItemDamage() >= frame.getMaxDamage()) {
- // Break the frame.
- frame = null;
- }
-
- return frame;
- }
-
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack){
- return this.rarity_value;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack){
- if ((this.rarity_value == EnumRarity.uncommon) || (this.rarity_value == EnumRarity.common)){
- return false;
- }
- return true;
- }
-
- @Override
- public IBeeModifier getBeeModifier() {
- return this.type;
- }
-
- @Override
- public boolean isBookEnchantable(final ItemStack itemstack1, final ItemStack itemstack2) {
- return false;
- }
-
- @Override
- public boolean isRepairable() {
- return false;
- }
-
- public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) {
- return this.type.getTerritoryModifier(genome, currentModifier);
- }
-
- public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
- return this.type.getMutationModifier(genome, mate, currentModifier);
- }
-
- public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
- return this.type.getLifespanModifier(genome, mate, currentModifier);
- }
-
- public float getProductionModifier(final IBeeGenome genome, final float currentModifier) {
- return this.type.getProductionModifier(genome, currentModifier);
- }
-
- public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) {
- return this.type.getFloweringModifier(genome, currentModifier);
- }
-
- public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) {
- return this.type.getGeneticDecay(genome, currentModifier);
- }
-
- public boolean isSealed() {
- return this.type.isSealed();
- }
-
- public boolean isSelfLighted() {
- return this.type.isSelfLighted();
- }
-
- public boolean isSunlightSimulated() {
- return this.type.isSunlightSimulated();
- }
-
- public boolean isHellish(){
- return this.type.isHellish();
- }
-
+public class MB_ItemFrame extends Item implements IHiveFrame {
+ private final MB_FrameType type;
+ private EnumRarity rarity_value = EnumRarity.uncommon;
+ private final String toolTip;
+
+ public MB_ItemFrame(final MB_FrameType frameType, final String description) {
+ this(frameType, EnumRarity.uncommon, description);
+ }
+
+ public MB_ItemFrame(final MB_FrameType frameType, final EnumRarity rarity, final String description) {
+ super();
+ this.type = frameType;
+ this.setMaxDamage(this.type.maxDamage);
+ this.setMaxStackSize(1);
+ this.setCreativeTab(AddToCreativeTab.tabMisc);
+ this.setUnlocalizedName("frame" + frameType.getName());
+ this.rarity_value = rarity;
+ this.toolTip = description;
+ GameRegistry.registerItem(this, "frame" + frameType.getName());
+ }
+
+ @Override
+ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ if ((this.toolTip != "") || !this.toolTip.equals("")) {
+ list.add(EnumChatFormatting.GRAY + this.toolTip);
+ }
+ super.addInformation(stack, aPlayer, list, bool);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(final IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon(CORE.MODID + ":frame" + this.type.getName());
+ }
+
+ // --------- IHiveFrame functions -----------------------------------------
+
+ @Override
+ public ItemStack frameUsed(final IBeeHousing housing, ItemStack frame, final IBee queen, final int wear) {
+ frame.setItemDamage(frame.getItemDamage() + wear);
+
+ if (frame.getItemDamage() >= frame.getMaxDamage()) {
+ // Break the frame.
+ frame = null;
+ }
+
+ return frame;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public EnumRarity getRarity(final ItemStack par1ItemStack) {
+ return this.rarity_value;
+ }
+
+ @Override
+ public boolean hasEffect(final ItemStack par1ItemStack) {
+ if ((this.rarity_value == EnumRarity.uncommon) || (this.rarity_value == EnumRarity.common)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public IBeeModifier getBeeModifier() {
+ return this.type;
+ }
+
+ @Override
+ public boolean isBookEnchantable(final ItemStack itemstack1, final ItemStack itemstack2) {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable() {
+ return false;
+ }
+
+ public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.type.getTerritoryModifier(genome, currentModifier);
+ }
+
+ public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
+ return this.type.getMutationModifier(genome, mate, currentModifier);
+ }
+
+ public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) {
+ return this.type.getLifespanModifier(genome, mate, currentModifier);
+ }
+
+ public float getProductionModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.type.getProductionModifier(genome, currentModifier);
+ }
+
+ public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) {
+ return this.type.getFloweringModifier(genome, currentModifier);
+ }
+
+ public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) {
+ return this.type.getGeneticDecay(genome, currentModifier);
+ }
+
+ public boolean isSealed() {
+ return this.type.isSealed();
+ }
+
+ public boolean isSelfLighted() {
+ return this.type.isSelfLighted();
+ }
+
+ public boolean isSunlightSimulated() {
+ return this.type.isSunlightSimulated();
+ }
+
+ public boolean isHellish() {
+ return this.type.isHellish();
+ }
}
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 26b32c8b22..df1b3be843 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,138 +1,129 @@
package gtPlusPlus.xmod.forestry.bees.items.output;
-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;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMap.Builder;
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
-import forestry.api.recipes.RecipeManagers;
-import gregtech.GT_Mod;
-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.core.material.Material;
-import gtPlusPlus.core.util.minecraft.MaterialUtils;
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 java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
-import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
public class GTPP_Comb extends Item {
- @SideOnly(Side.CLIENT)
- private IIcon secondIcon;
-
- public GTPP_Comb() {
- super();
- this.setCreativeTab(Tabs.tabApiculture);
- this.setHasSubtypes(true);
- this.setUnlocalizedName("gtpp.comb");
- GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID);
- }
-
- public ItemStack getStackForType(GTPP_CombType type) {
- return new ItemStack(this, 1, type.mID);
- }
-
- public ItemStack getStackForType(GTPP_CombType type, int count) {
- 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.mShowInList) {
- list.add(this.getStackForType(type));
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
-
- @Override
- public int getRenderPasses(int meta) {
- return 2;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister par1IconRegister) {
- this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
- this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return (pass == 0) ? itemIcon : secondIcon;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass) {
- int colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[0];
-
- if (pass >= 1) {
- colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[1];
- }
-
- return colour;
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack stack) {
- return GTPP_CombType.get(stack.getItemDamage()).getName();
- }
-
- public static void initCombsRecipes() {
-
- addChemicalRecipe(GTPP_CombType.DRAGONBLOOD, new ItemStack[]{GT_ModHandler.getModItem("Forestry", "refractoryWax", 1L, 0), GTPP_Bees.propolis.getStackForType(GTPP_PropolisType.DRAGONBLOOD), GTPP_Bees.drop.getStackForType(GTPP_DropType.DRAGONBLOOD)}, new int[]{3000, 1500, 500});
- addChemicalRecipe(GTPP_CombType.FORCE, new ItemStack[]{GT_ModHandler.getModItem("Forestry", "beeswax", 1L, 0), GTPP_Bees.propolis.getStackForType(GTPP_PropolisType.FORCE), GTPP_Bees.drop.getStackForType(GTPP_DropType.FORCE)}, new int[]{5000, 3000, 1000});
-
- }
-
- public static void addChemicalRecipe(GTPP_CombType aInputStack, ItemStack[] aOutputs, int[] aChances) {
- Material aMat = aInputStack.mMaterial;
- long aEU = aMat.vVoltageMultiplier;
- int aTier = Math.max(aMat.vTier/2, 1);
- CORE.RA.addChemicalPlantRecipe(
- new ItemStack[] {
- aInputStack.getStackForType(aTier),
- },
- new FluidStack[] {},
- aOutputs,
- new FluidStack[] {},
- aChances,
- aTier * 20 * 60,
- aEU,
- aTier);
-
- }
-
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
+
+ public GTPP_Comb() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gtpp.comb");
+ GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID);
+ }
+
+ public ItemStack getStackForType(GTPP_CombType type) {
+ return new ItemStack(this, 1, type.mID);
+ }
+
+ public ItemStack getStackForType(GTPP_CombType type, int count) {
+ 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.mShowInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
+
+ @Override
+ public int getRenderPasses(int meta) {
+ return 2;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
+ this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return (pass == 0) ? itemIcon : secondIcon;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ int colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[0];
+
+ if (pass >= 1) {
+ colour = GTPP_CombType.get(stack.getItemDamage()).getColours()[1];
+ }
+
+ return colour;
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return GTPP_CombType.get(stack.getItemDamage()).getName();
+ }
+
+ public static void initCombsRecipes() {
+
+ addChemicalRecipe(
+ GTPP_CombType.DRAGONBLOOD,
+ new ItemStack[] {
+ GT_ModHandler.getModItem("Forestry", "refractoryWax", 1L, 0),
+ GTPP_Bees.propolis.getStackForType(GTPP_PropolisType.DRAGONBLOOD),
+ GTPP_Bees.drop.getStackForType(GTPP_DropType.DRAGONBLOOD)
+ },
+ new int[] {3000, 1500, 500});
+ addChemicalRecipe(
+ GTPP_CombType.FORCE,
+ new ItemStack[] {
+ GT_ModHandler.getModItem("Forestry", "beeswax", 1L, 0),
+ GTPP_Bees.propolis.getStackForType(GTPP_PropolisType.FORCE),
+ GTPP_Bees.drop.getStackForType(GTPP_DropType.FORCE)
+ },
+ new int[] {5000, 3000, 1000});
+ }
+
+ public static void addChemicalRecipe(GTPP_CombType aInputStack, ItemStack[] aOutputs, int[] aChances) {
+ Material aMat = aInputStack.mMaterial;
+ long aEU = aMat.vVoltageMultiplier;
+ int aTier = Math.max(aMat.vTier / 2, 1);
+ CORE.RA.addChemicalPlantRecipe(
+ new ItemStack[] {
+ aInputStack.getStackForType(aTier),
+ },
+ new FluidStack[] {},
+ aOutputs,
+ new FluidStack[] {},
+ aChances,
+ aTier * 20 * 60,
+ aEU,
+ aTier);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java
index 922adad277..b32ac5c601 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Drop.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.forestry.bees.items.output;
-import java.util.List;
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -11,6 +9,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType;
import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
+import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
@@ -20,94 +19,96 @@ import net.minecraftforge.fluids.FluidStack;
public class GTPP_Drop extends Item {
- @SideOnly(Side.CLIENT)
- private IIcon secondIcon;
-
- public GTPP_Drop() {
- super();
- this.setCreativeTab(Tabs.tabApiculture);
- this.setHasSubtypes(true);
- this.setUnlocalizedName("gtpp.drop");
- GameRegistry.registerItem(this, "gtpp.drop", CORE.MODID);
- }
-
- public ItemStack getStackForType(GTPP_DropType type) {
- return new ItemStack(this, 1, type.mID);
- }
-
- public ItemStack getStackForType(GTPP_DropType type, int count) {
- return new ItemStack(this, count, type.mID);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs tabs, List list) {
- for (GTPP_DropType type : GTPP_DropType.values()) {
- if (type.mShowInList) {
- list.add(this.getStackForType(type));
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
-
- @Override
- public int getRenderPasses(int meta) {
- return 2;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister par1IconRegister) {
- this.itemIcon = par1IconRegister.registerIcon("forestry:honeyDrop.0");
- this.secondIcon = par1IconRegister.registerIcon("forestry:honeyDrop.1");
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return (pass == 0) ? itemIcon : secondIcon;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass) {
- int colour = GTPP_DropType.get(stack.getItemDamage()).getColours()[0];
-
- if (pass >= 1) {
- colour = GTPP_DropType.get(stack.getItemDamage()).getColours()[1];
- }
-
- return colour;
- }
-
- @Override
- public String getItemStackDisplayName(ItemStack stack) {
- return GTPP_DropType.get(stack.getItemDamage()).getName();
- }
-
- private static final int[] sFluidOutputs = new int[] {
- 144, 136, 128, 120, 112, 104, 96, 88, 80, 72, 64, 48, 32, 16, 8, 4
- };
-
- public static void initDropsRecipes() {
- ItemStack tDrop;
- Logger.BEES("Processing recipes for "+GTPP_Bees.sDropMappings.size()+" Drops.");
- for (GTPP_DropType aDrop : GTPP_Bees.sDropMappings.values()) {
- tDrop = aDrop.getStackForType(1);
- if (addProcess(tDrop, new FluidStack(aDrop.mMaterial.getFluid(), sFluidOutputs[aDrop.mMaterial.vTier]), aDrop.mMaterial.vTier * 20 * 30, aDrop.mMaterial.vVoltageMultiplier)) {
- Logger.BEES("Added Drop extraction recipe for: "+aDrop.getName());
- }
- else {
- Logger.BEES("Failed to add Drop extraction recipe for: "+aDrop.getName());
- }
- }
- }
-
- public static boolean addProcess(ItemStack tDrop, FluidStack aOutput, int aDuration, int aEUt) {
- return GT_Values.RA.addFluidExtractionRecipe(tDrop, null, aOutput, 10000, aDuration, aEUt);
- }
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
+
+ public GTPP_Drop() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gtpp.drop");
+ GameRegistry.registerItem(this, "gtpp.drop", CORE.MODID);
+ }
+
+ public ItemStack getStackForType(GTPP_DropType type) {
+ return new ItemStack(this, 1, type.mID);
+ }
+
+ public ItemStack getStackForType(GTPP_DropType type, int count) {
+ return new ItemStack(this, count, type.mID);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs tabs, List list) {
+ for (GTPP_DropType type : GTPP_DropType.values()) {
+ if (type.mShowInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
+
+ @Override
+ public int getRenderPasses(int meta) {
+ return 2;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:honeyDrop.0");
+ this.secondIcon = par1IconRegister.registerIcon("forestry:honeyDrop.1");
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return (pass == 0) ? itemIcon : secondIcon;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ int colour = GTPP_DropType.get(stack.getItemDamage()).getColours()[0];
+
+ if (pass >= 1) {
+ colour = GTPP_DropType.get(stack.getItemDamage()).getColours()[1];
+ }
+
+ return colour;
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return GTPP_DropType.get(stack.getItemDamage()).getName();
+ }
+
+ private static final int[] sFluidOutputs =
+ new int[] {144, 136, 128, 120, 112, 104, 96, 88, 80, 72, 64, 48, 32, 16, 8, 4};
+
+ public static void initDropsRecipes() {
+ ItemStack tDrop;
+ Logger.BEES("Processing recipes for " + GTPP_Bees.sDropMappings.size() + " Drops.");
+ for (GTPP_DropType aDrop : GTPP_Bees.sDropMappings.values()) {
+ tDrop = aDrop.getStackForType(1);
+ if (addProcess(
+ tDrop,
+ new FluidStack(aDrop.mMaterial.getFluid(), sFluidOutputs[aDrop.mMaterial.vTier]),
+ aDrop.mMaterial.vTier * 20 * 30,
+ aDrop.mMaterial.vVoltageMultiplier)) {
+ Logger.BEES("Added Drop extraction recipe for: " + aDrop.getName());
+ } else {
+ Logger.BEES("Failed to add Drop extraction recipe for: " + aDrop.getName());
+ }
+ }
+ }
+
+ public static boolean addProcess(ItemStack tDrop, FluidStack aOutput, int aDuration, int aEUt) {
+ return GT_Values.RA.addFluidExtractionRecipe(tDrop, null, aOutput, 10000, aDuration, aEUt);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java
index 9d13ca7ebd..7fd8a7ec20 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Pollen.java
@@ -1,13 +1,12 @@
package gtPlusPlus.xmod.forestry.bees.items.output;
-import java.util.List;
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.forestry.bees.handler.GTPP_PollenType;
+import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
@@ -15,75 +14,73 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class GTPP_Pollen extends Item {
-
- @SideOnly(Side.CLIENT)
- private IIcon secondIcon;
-
- public GTPP_Pollen() {
- super();
- this.setCreativeTab(Tabs.tabApiculture);
- this.setHasSubtypes(true);
- this.setUnlocalizedName("gtpp.pollen");
- GameRegistry.registerItem(this, "gtpp.pollen", CORE.MODID);
- }
-
- public ItemStack getStackForType(GTPP_PollenType type) {
- return new ItemStack(this, 1, type.mID);
- }
- public ItemStack getStackForType(GTPP_PollenType type, int count) {
- return new ItemStack(this, count, type.mID);
- }
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs tabs, List list) {
- for (GTPP_PollenType type : GTPP_PollenType.values()) {
- if (type.mShowInList) {
- list.add(this.getStackForType(type));
- }
- }
- }
+ public GTPP_Pollen() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gtpp.pollen");
+ GameRegistry.registerItem(this, "gtpp.pollen", CORE.MODID);
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
+ public ItemStack getStackForType(GTPP_PollenType type) {
+ return new ItemStack(this, 1, type.mID);
+ }
- @Override
- public int getRenderPasses(int meta) {
- return 2;
- }
+ public ItemStack getStackForType(GTPP_PollenType type, int count) {
+ return new ItemStack(this, count, type.mID);
+ }
- @Override
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs tabs, List list) {
+ for (GTPP_PollenType type : GTPP_PollenType.values()) {
+ if (type.mShowInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
+
+ @Override
@SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister par1IconRegister) {
- this.itemIcon = par1IconRegister.registerIcon("forestry:pollen.0");
- this.secondIcon = par1IconRegister.registerIcon("forestry:pollen.1");
- }
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return (pass == 0) ? itemIcon : secondIcon;
- }
+ @Override
+ public int getRenderPasses(int meta) {
+ return 2;
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass) {
- int colour = GTPP_PollenType.get(stack.getItemDamage()).getColours()[0];
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:pollen.0");
+ this.secondIcon = par1IconRegister.registerIcon("forestry:pollen.1");
+ }
- if (pass >= 1) {
- colour = GTPP_PollenType.get(stack.getItemDamage()).getColours()[1];
- }
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return (pass == 0) ? itemIcon : secondIcon;
+ }
- return colour;
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ int colour = GTPP_PollenType.get(stack.getItemDamage()).getColours()[0];
- @Override
- public String getItemStackDisplayName(ItemStack stack) {
- return GTPP_PollenType.get(stack.getItemDamage()).getName();
- }
+ if (pass >= 1) {
+ colour = GTPP_PollenType.get(stack.getItemDamage()).getColours()[1];
+ }
+ return colour;
+ }
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return GTPP_PollenType.get(stack.getItemDamage()).getName();
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java
index fef721839b..e6976f0512 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/output/GTPP_Propolis.java
@@ -1,16 +1,14 @@
package gtPlusPlus.xmod.forestry.bees.items.output;
-import java.util.List;
-
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
-import gregtech.api.enums.GT_Values;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType;
import gtPlusPlus.xmod.forestry.bees.registry.GTPP_Bees;
+import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
@@ -18,74 +16,77 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class GTPP_Propolis extends Item {
-
- @SideOnly(Side.CLIENT)
- private IIcon secondIcon;
- public GTPP_Propolis() {
- super();
- this.setCreativeTab(Tabs.tabApiculture);
- this.setHasSubtypes(true);
- this.setUnlocalizedName("gtpp.propolis");
- GameRegistry.registerItem(this, "gtpp.propolis", CORE.MODID);
- }
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
- public ItemStack getStackForType(GTPP_PropolisType type) {
- return new ItemStack(this, 1, type.mID);
- }
+ public GTPP_Propolis() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gtpp.propolis");
+ GameRegistry.registerItem(this, "gtpp.propolis", CORE.MODID);
+ }
- public ItemStack getStackForType(GTPP_PropolisType type, int count) {
- return new ItemStack(this, count, type.mID);
- }
+ public ItemStack getStackForType(GTPP_PropolisType type) {
+ return new ItemStack(this, 1, type.mID);
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(Item item, CreativeTabs tabs, List list) {
- for (GTPP_PropolisType type : GTPP_PropolisType.values()) {
- if (type.mShowInList) {
- list.add(this.getStackForType(type));
- }
- }
- }
+ public ItemStack getStackForType(GTPP_PropolisType type, int count) {
+ return new ItemStack(this, count, type.mID);
+ }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs tabs, List list) {
+ for (GTPP_PropolisType type : GTPP_PropolisType.values()) {
+ if (type.mShowInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
- @Override
+ @Override
@SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister par1IconRegister) {
- this.itemIcon = par1IconRegister.registerIcon("forestry:propolis.0");
- }
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:propolis.0");
+ }
- @Override
- public IIcon getIcon(ItemStack stack, int pass) {
- return itemIcon;
- }
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return itemIcon;
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass) {
- return GTPP_PropolisType.get(stack.getItemDamage()).getColours();
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ return GTPP_PropolisType.get(stack.getItemDamage()).getColours();
+ }
- @Override
- public String getItemStackDisplayName(ItemStack stack) {
- return GTPP_PropolisType.get(stack.getItemDamage()).getName();
- }
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return GTPP_PropolisType.get(stack.getItemDamage()).getName();
+ }
- public static void initPropolisRecipes() {
- ItemStack tDrop;
- Logger.BEES("Processing recipes for "+GTPP_Bees.sPropolisMappings.size()+" Propolis.");
- for (GTPP_PropolisType aProp : GTPP_Bees.sPropolisMappings.values()) {
- tDrop = aProp.getStackForType(1);
- if (addProcess(tDrop, aProp.mMaterial.getDust(1), Math.min(Math.max(10000-(aProp.mMaterial.vTier*625), 100), 10000), aProp.mMaterial.vTier * 20 * 15, aProp.mMaterial.vVoltageMultiplier)) {
- Logger.BEES("Added Propolis extraction recipe for: "+aProp.getName());
- }
- else {
- Logger.BEES("Failed to add Propolis extraction recipe for: "+aProp.getName());
- }
- }
- }
+ public static void initPropolisRecipes() {
+ ItemStack tDrop;
+ Logger.BEES("Processing recipes for " + GTPP_Bees.sPropolisMappings.size() + " Propolis.");
+ for (GTPP_PropolisType aProp : GTPP_Bees.sPropolisMappings.values()) {
+ tDrop = aProp.getStackForType(1);
+ if (addProcess(
+ tDrop,
+ aProp.mMaterial.getDust(1),
+ Math.min(Math.max(10000 - (aProp.mMaterial.vTier * 625), 100), 10000),
+ aProp.mMaterial.vTier * 20 * 15,
+ aProp.mMaterial.vVoltageMultiplier)) {
+ Logger.BEES("Added Propolis extraction recipe for: " + aProp.getName());
+ } else {
+ Logger.BEES("Failed to add Propolis extraction recipe for: " + aProp.getName());
+ }
+ }
+ }
- public static boolean addProcess(ItemStack tDrop, ItemStack aOutput, int aChance, int aDuration, int aEUt) {
- return CORE.RA.addExtractorRecipe(tDrop, aOutput, aChance, aDuration, aEUt);
- }
+ public static boolean addProcess(ItemStack tDrop, ItemStack aOutput, int aChance, int aDuration, int aEUt) {
+ return CORE.RA.addExtractorRecipe(tDrop, aOutput, aChance, aDuration, aEUt);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java
index ddc401f752..568508e06f 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java
@@ -1,129 +1,179 @@
package gtPlusPlus.xmod.forestry.bees.recipe;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
public class FR_Gregtech_Recipes {
- private static String rod_Electrum = "stickElectrum";
- private static String rod_LongElectrum = "stickLongElectrum";
- private static String foil_Electrum = "foilElectrum";
- private static String rod_Uranium = "stickUranium";
- private static String rod_LongUranium = "stickLongUranium";
- private static String foil_Uranium235 = "foilUranium235";
- private static ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated);
- private static ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic);
- private static ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid);
- private static ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy);
-
- private static ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa);
- private static ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged);
- private static ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul);
- private static ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay);
- private static ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova);
-
- private static ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1);
- private static ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1);
- private static ItemStack blockIronBars = new ItemStack (Blocks.iron_bars, 1);
- private static ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1);
- private static ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3);
-
- private static ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay);
- private static ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow);
- private static ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize);
- private static ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist);
-
- public static void registerItems(){
- //Magic Bee Like Frames
- RecipeUtils.addShapedGregtechRecipe(
- rod_LongElectrum, rod_Electrum, rod_LongElectrum,
- rod_LongElectrum, foil_Electrum, rod_LongElectrum,
- rod_Electrum, rod_Electrum, rod_Electrum,
- hiveFrameAccelerated);
-
- RecipeUtils.addShapedGregtechRecipe(
- rod_LongUranium, rod_Uranium, rod_LongUranium,
- rod_LongUranium, foil_Uranium235, rod_LongUranium,
- rod_Uranium, rod_Uranium, rod_Uranium,
- hiveFrameMutagenic);
- if (!CORE.GTNH) {
- RecipeUtils.addShapedGregtechRecipe(
- "stickLongThaumium", "stickThaumium", "stickLongThaumium",
- "stickLongThaumium", ItemUtils.getSimpleStack(Items.ender_pearl), "stickLongThaumium",
- "stickThaumium", "stickThaumium", "stickThaumium",
- hiveFrameVoid);
- }
- else {
- if (LoadedMods.MagicBees) {
- RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {hiveFrameVoid}, ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1));
- }
- }
- RecipeUtils.addShapedGregtechRecipe(
- "stickLongBlueSteel", "stickBlueSteel", "stickLongBlueSteel",
- "stickLongBlueSteel", ItemUtils.getSimpleStack(Items.nether_star), "stickLongBlueSteel",
- "stickBlueSteel", "stickBlueSteel", "stickBlueSteel",
- hiveFrameBusy);
-
- if (!LoadedMods.ExtraBees){
- //Extra Bee Like Frames
- RecipeUtils.addShapedRecipe(
- null, itemCocoaBeans, null,
- itemCocoaBeans, hiveFrameImpregnated, itemCocoaBeans,
- null, itemCocoaBeans, null,
- hiveFrameCocoa);
-
- RecipeUtils.addShapedRecipe(
- hiveFrameImpregnated, blockIronBars, null,
- null, null, null,
- null, null, null,
- hiveFrameCaged);
-
- RecipeUtils.addShapedRecipe(
- hiveFrameImpregnated, blockSoulSand, null,
- null, null, null,
- null, null, null,
- hiveFrameSoul);
-
- RecipeUtils.addShapedRecipe(
- null, itemClayDust, null,
- itemClayDust, hiveFrameImpregnated, itemClayDust,
- null, itemClayDust, null,
- hiveFrameClay);
- }
-
- // Frame Items added by bartimaeusnek
- RecipeUtils.addShapedGregtechRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),foil_Electrum,ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),
- hiveFrameSlow);
-
- RecipeUtils.addShapedGregtechRecipe(
- "stickLongWroughtIron","stickWroughtIron","stickLongWroughtIron",
- "stickLongWroughtIron","foilZinc","stickLongWroughtIron",
- "stickWroughtIron","stickWroughtIron","stickWroughtIron",
- hiveFrameDecay);
-
- RecipeUtils.addShapedGregtechRecipe(
- "stickLongOsmiridium","stickOsmiridium","stickLongOsmiridium",
- "stickLongOsmiridium","foilOsmiridium","stickLongOsmiridium",
- "stickOsmiridium","stickOsmiridium","stickOsmiridium",
- hiveFrameStalilize);
-
- RecipeUtils.addShapedGregtechRecipe(
- "stickLongWoodSealed","stickWoodSealed","stickLongWoodSealed",
- "stickLongWoodSealed",Items.paper,"stickLongWoodSealed",
- "stickWoodSealed","stickWoodSealed","stickWoodSealed",
- hiveFrameArborist);
- }
-
+ private static String rod_Electrum = "stickElectrum";
+ private static String rod_LongElectrum = "stickLongElectrum";
+ private static String foil_Electrum = "foilElectrum";
+ private static String rod_Uranium = "stickUranium";
+ private static String rod_LongUranium = "stickLongUranium";
+ private static String foil_Uranium235 = "foilUranium235";
+ private static ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated);
+ private static ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic);
+ private static ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid);
+ private static ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy);
+
+ private static ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa);
+ private static ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged);
+ private static ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul);
+ private static ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay);
+ private static ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova);
+
+ private static ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1);
+ private static ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1);
+ private static ItemStack blockIronBars = new ItemStack(Blocks.iron_bars, 1);
+ private static ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1);
+ private static ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3);
+
+ private static ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay);
+ private static ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow);
+ private static ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize);
+ private static ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist);
+
+ public static void registerItems() {
+ // Magic Bee Like Frames
+ RecipeUtils.addShapedGregtechRecipe(
+ rod_LongElectrum,
+ rod_Electrum,
+ rod_LongElectrum,
+ rod_LongElectrum,
+ foil_Electrum,
+ rod_LongElectrum,
+ rod_Electrum,
+ rod_Electrum,
+ rod_Electrum,
+ hiveFrameAccelerated);
+
+ RecipeUtils.addShapedGregtechRecipe(
+ rod_LongUranium,
+ rod_Uranium,
+ rod_LongUranium,
+ rod_LongUranium,
+ foil_Uranium235,
+ rod_LongUranium,
+ rod_Uranium,
+ rod_Uranium,
+ rod_Uranium,
+ hiveFrameMutagenic);
+ if (!CORE.GTNH) {
+ RecipeUtils.addShapedGregtechRecipe(
+ "stickLongThaumium",
+ "stickThaumium",
+ "stickLongThaumium",
+ "stickLongThaumium",
+ ItemUtils.getSimpleStack(Items.ender_pearl),
+ "stickLongThaumium",
+ "stickThaumium",
+ "stickThaumium",
+ "stickThaumium",
+ hiveFrameVoid);
+ } else {
+ if (LoadedMods.MagicBees) {
+ RecipeUtils.addShapelessGregtechRecipe(
+ new ItemStack[] {hiveFrameVoid}, ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1));
+ }
+ }
+ RecipeUtils.addShapedGregtechRecipe(
+ "stickLongBlueSteel",
+ "stickBlueSteel",
+ "stickLongBlueSteel",
+ "stickLongBlueSteel",
+ ItemUtils.getSimpleStack(Items.nether_star),
+ "stickLongBlueSteel",
+ "stickBlueSteel",
+ "stickBlueSteel",
+ "stickBlueSteel",
+ hiveFrameBusy);
+
+ if (!LoadedMods.ExtraBees) {
+ // Extra Bee Like Frames
+ RecipeUtils.addShapedRecipe(
+ null,
+ itemCocoaBeans,
+ null,
+ itemCocoaBeans,
+ hiveFrameImpregnated,
+ itemCocoaBeans,
+ null,
+ itemCocoaBeans,
+ null,
+ hiveFrameCocoa);
+
+ RecipeUtils.addShapedRecipe(
+ hiveFrameImpregnated, blockIronBars, null, null, null, null, null, null, null, hiveFrameCaged);
+
+ RecipeUtils.addShapedRecipe(
+ hiveFrameImpregnated, blockSoulSand, null, null, null, null, null, null, null, hiveFrameSoul);
+
+ RecipeUtils.addShapedRecipe(
+ null,
+ itemClayDust,
+ null,
+ itemClayDust,
+ hiveFrameImpregnated,
+ itemClayDust,
+ null,
+ itemClayDust,
+ null,
+ hiveFrameClay);
+ }
+
+ // Frame Items added by bartimaeusnek
+ RecipeUtils.addShapedGregtechRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
+ foil_Electrum,
+ ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),
+ hiveFrameSlow);
+
+ RecipeUtils.addShapedGregtechRecipe(
+ "stickLongWroughtIron",
+ "stickWroughtIron",
+ "stickLongWroughtIron",
+ "stickLongWroughtIron",
+ "foilZinc",
+ "stickLongWroughtIron",
+ "stickWroughtIron",
+ "stickWroughtIron",
+ "stickWroughtIron",
+ hiveFrameDecay);
+
+ RecipeUtils.addShapedGregtechRecipe(
+ "stickLongOsmiridium",
+ "stickOsmiridium",
+ "stickLongOsmiridium",
+ "stickLongOsmiridium",
+ "foilOsmiridium",
+ "stickLongOsmiridium",
+ "stickOsmiridium",
+ "stickOsmiridium",
+ "stickOsmiridium",
+ hiveFrameStalilize);
+
+ RecipeUtils.addShapedGregtechRecipe(
+ "stickLongWoodSealed",
+ "stickWoodSealed",
+ "stickLongWoodSealed",
+ "stickLongWoodSealed",
+ Items.paper,
+ "stickLongWoodSealed",
+ "stickWoodSealed",
+ "stickWoodSealed",
+ "stickWoodSealed",
+ hiveFrameArborist);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java
index 222b1215eb..8258fbfcb5 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java
@@ -9,32 +9,49 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
public class GTPP_AlleleBeeSpecies extends AlleleBeeSpecies {
-
- public GTPP_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) {
- super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor, secondaryColor);
- AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES);
- }
- @Override
- public IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance) {
- if (product == null || product.getItem() == null) {
- product = new ItemStack(Items.boat);
- }
- if (chance <= 0.0f || chance > 1.0f) {
- chance = 0.1f;
- }
- return super.addProduct(product, chance);
- }
+ public GTPP_AlleleBeeSpecies(
+ String uid,
+ boolean dominant,
+ String unlocalizedName,
+ String authority,
+ String unlocalizedDescription,
+ IClassification branch,
+ String binomial,
+ int primaryColor,
+ int secondaryColor) {
+ super(
+ uid,
+ unlocalizedName,
+ authority,
+ unlocalizedDescription,
+ dominant,
+ branch,
+ binomial,
+ primaryColor,
+ secondaryColor);
+ AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES);
+ }
- @Override
- public IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance) {
- if (specialty == null || specialty.getItem() == null) {
- specialty = new ItemStack(Items.boat);
- }
- if (chance <= 0.0f || chance > 1.0f) {
- chance = 0.1f;
- }
- return super.addSpecialty(specialty, chance);
- }
+ @Override
+ public IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance) {
+ if (product == null || product.getItem() == null) {
+ product = new ItemStack(Items.boat);
+ }
+ if (chance <= 0.0f || chance > 1.0f) {
+ chance = 0.1f;
+ }
+ return super.addProduct(product, chance);
+ }
+ @Override
+ public IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance) {
+ if (specialty == null || specialty.getItem() == null) {
+ specialty = new ItemStack(Items.boat);
+ }
+ if (chance <= 0.0f || chance > 1.0f) {
+ chance = 0.1f;
+ }
+ return super.addSpecialty(specialty, chance);
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java
index f94a178007..89cb54e603 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java
@@ -3,13 +3,6 @@ package gtPlusPlus.xmod.forestry.bees.registry;
import static forestry.api.apiculture.EnumBeeChromosome.*;
import static forestry.api.core.EnumHumidity.ARID;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Locale;
-import java.util.function.Consumer;
-
-import org.apache.commons.lang3.text.WordUtils;
-
import forestry.api.apiculture.*;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
@@ -31,12 +24,22 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.function.Consumer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.BiomeDictionary.Type;
+import org.apache.commons.lang3.text.WordUtils;
public enum GTPP_BeeDefinition implements IBeeDefinition {
-
- DRAGONBLOOD(GTPP_BranchDefinition.LEGENDARY, "Dragon Blood", STANDALONE.DRAGON_METAL, true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20),
+ DRAGONBLOOD(
+ GTPP_BranchDefinition.LEGENDARY,
+ "Dragon Blood",
+ STANDALONE.DRAGON_METAL,
+ true,
+ Utils.rgbtoHexValue(220, 20, 20),
+ Utils.rgbtoHexValue(20, 20, 20),
beeSpecies -> {
beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f);
beeSpecies.addSpecialty(GTPP_Bees.combs.getStackForType(GTPP_CombType.DRAGONBLOOD), 0.10f);
@@ -54,10 +57,15 @@ public enum GTPP_BeeDefinition implements IBeeDefinition {
IBeeMutationCustom tMutation = dis.registerMutation("DRAGONESSENCE", "NEUTRONIUM", 2);
tMutation.restrictHumidity(ARID);
tMutation.requireResource(STANDALONE.DRAGON_METAL.getBlock(), 1);
- tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim
- }
- ),
- FORCE(GTPP_BranchDefinition.LEGENDARY, "Force", STANDALONE.FORCE, true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5),
+ tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim
+ }),
+ FORCE(
+ GTPP_BranchDefinition.LEGENDARY,
+ "Force",
+ STANDALONE.FORCE,
+ true,
+ Utils.rgbtoHexValue(250, 250, 20),
+ Utils.rgbtoHexValue(200, 200, 5),
beeSpecies -> {
beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f);
beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALT), 0.15f);
@@ -75,220 +83,254 @@ public enum GTPP_BeeDefinition implements IBeeDefinition {
dis -> {
IBeeMutationCustom tMutation = dis.registerMutation("STEEL", "GOLD", 10);
tMutation.restrictHumidity(ARID);
- tMutation.restrictBiomeType(Type.HOT);
- }
- ),
-
+ tMutation.restrictBiomeType(Type.HOT);
+ }),
;
- private final GTPP_BranchDefinition branch;
- private final GTPP_AlleleBeeSpecies species;
- private final Consumer<GTPP_AlleleBeeSpecies> mSpeciesProperties;
- private final Consumer<IAllele[]> mAlleles;
- private final Consumer<GTPP_BeeDefinition> mMutations;
- private IAllele[] template;
- private IBeeGenome genome;
-
- GTPP_BeeDefinition(GTPP_BranchDefinition branch, String binomial, Materials aMat, boolean dominant, int primary, int secondary, Consumer<GTPP_AlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles, Consumer<GTPP_BeeDefinition> aMutations) {
- this(branch, binomial, MaterialUtils.generateMaterialFromGtENUM(aMat), dominant, primary, secondary, aSpeciesProperties, aAlleles, aMutations);
- }
-
- GTPP_BeeDefinition(GTPP_BranchDefinition branch, String binomial, Material aMat, boolean dominant, int primary, int secondary, Consumer<GTPP_AlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles, Consumer<GTPP_BeeDefinition> aMutations) {
- this.mAlleles = aAlleles;
- this.mMutations = aMutations;
- this.mSpeciesProperties = aSpeciesProperties;
- String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH);
- String species = WordUtils.capitalize(binomial);
- String uid = "gtpp.bee.species" + species;
- String description = "for.description." + species;
- String name = "for.bees.species." + lowercaseName;
- GT_LanguageManager.addStringLocalization("for.bees.species." + lowercaseName, species, true);
- GTPP_Bees.sMaterialMappings.put(binomial.toLowerCase().replaceAll(" ", ""), aMat);
- this.branch = branch;
- this.species = new GTPP_AlleleBeeSpecies(uid, dominant, name, "GT++", description, branch.getBranch(), binomial, primary, secondary);
- }
-
- public static void initBees() {
- for (GTPP_BeeDefinition bee : values()) { bee.init(); }
- for (GTPP_BeeDefinition bee : values()) { bee.registerMutations(); }
- }
-
- protected static IAlleleBeeEffect getEffect(byte modid, String name) {
- String s;
- switch (modid) {
- case GTPP_Bees.EXTRABEES :
- s = "extrabees.effect." + name;
- break;
- case GTPP_Bees.GENDUSTRY :
- s = "gendustry.effect." + name;
- break;
- case GTPP_Bees.MAGICBEES :
- s = "magicbees.effect" + name;
- break;
- case GTPP_Bees.GREGTECH :
- s = "gregtech.effect" + name;
- break;
- default :
- s = "forestry.effect" + name;
- break;
-
- }
- return (IAlleleBeeEffect) AlleleManager.alleleRegistry.getAllele(s);
- }
-
- protected static IAlleleFlowers getFlowers(byte modid, String name) {
- String s;
- switch (modid) {
- case GTPP_Bees.EXTRABEES :
- s = "extrabees.flower." + name;
- break;
- case GTPP_Bees.GENDUSTRY :
- s = "gendustry.flower." + name;
- break;
- case GTPP_Bees.MAGICBEES :
- s = "magicbees.flower" + name;
- break;
- case GTPP_Bees.GREGTECH :
- s = "gregtech.flower" + name;
- break;
- default :
- s = "forestry.flowers" + name;
- break;
-
- }
- return (IAlleleFlowers) AlleleManager.alleleRegistry.getAllele(s);
- }
-
- protected static IAlleleBeeSpecies getSpecies(byte modid, String name) {
- String s;
- switch (modid) {
- case GTPP_Bees.EXTRABEES :
- s = "extrabees.species." + name;
- break;
- case GTPP_Bees.GENDUSTRY :
- s = "gendustry.bee." + name;
- break;
- case GTPP_Bees.MAGICBEES :
- s = "magicbees.species" + name;
- break;
- case GTPP_Bees.GREGTECH :
- s = "gregtech.species" + name;
- break;
- default :
- s = "forestry.species" + name;
- break;
-
- }
- IAlleleBeeSpecies ret = (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s);
- return ret;
- }
-
- protected final void setSpeciesProperties(GTPP_AlleleBeeSpecies species2) {
- this.mSpeciesProperties.accept(species2);
- }
-
- protected final void setAlleles(IAllele[] template) {
- this.mAlleles.accept(template);
- }
-
- protected final void registerMutations() {
- this.mMutations.accept(this);
- }
-
- private void init() {
- setSpeciesProperties(species);
-
- template = branch.getTemplate();
- AlleleHelper.instance.set(template, SPECIES, species);
- setAlleles(template);
-
- genome = BeeManager.beeRoot.templateAsGenome(template);
-
- BeeManager.beeRoot.registerTemplate(template);
- }
-
- protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) {
- return registerMutation(parent1, parent2, chance, 1f);
- }
-
- protected final IBeeMutationCustom registerMutation(GTPP_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance) {
- return registerMutation(parent1, parent2, chance, 1f);
- }
-
- protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, GTPP_BeeDefinition parent2, int chance) {
- return registerMutation(parent1, parent2, chance, 1f);
- }
-
- protected final IBeeMutationCustom registerMutation(GTPP_BeeDefinition parent1, GTPP_BeeDefinition parent2, int chance) {
- return registerMutation(parent1, parent2, chance, 1f);
- }
-
- protected final IBeeMutationCustom registerMutation(String parent1, String parent2, int chance) {
- return registerMutation(getGregtechBeeType(parent1), getGregtechBeeType(parent2), chance, 1f);
- }
-
- /**
- * Diese neue Funtion erlaubt Mutationsraten unter 1%. Setze dazu die
- * Mutationsrate als Bruch mit chance / chancedivider This new function
- * allows Mutation percentages under 1%. Set them as a fraction with chance
- * / chancedivider
- */
- protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance, float chancedivider) {
- return new GTPP_Bee_Mutation(parent1, parent2, this.getTemplate(), chance, chancedivider);
- }
-
- protected final IBeeMutationCustom registerMutation(GTPP_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance, float chancedivider) {
- return registerMutation(parent1.species, parent2, chance, chancedivider);
- }
-
- protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, GTPP_BeeDefinition parent2, int chance, float chancedivider) {
- return registerMutation(parent1, parent2.species, chance, chancedivider);
- }
-
- protected final IBeeMutationCustom registerMutation(GTPP_BeeDefinition parent1, GTPP_BeeDefinition parent2, int chance, float chancedivider) {
- return registerMutation(parent1.species, parent2, chance, chancedivider);
- }
-
- protected final IBeeMutationCustom registerMutation(String parent1, String parent2, int chance, float chancedivider) {
- return registerMutation(getGregtechBeeType(parent1), getGregtechBeeType(parent2), chance, chancedivider);
- }
-
- @Override
- public final IAllele[] getTemplate() {
- return Arrays.copyOf(template, template.length);
- }
-
- @Override
- public final IBeeGenome getGenome() {
- return genome;
- }
-
- @Override
- public final IBee getIndividual() {
- return new Bee(genome);
- }
-
- @Override
- public final ItemStack getMemberStack(EnumBeeType beeType) {
- return BeeManager.beeRoot.getMemberStack(getIndividual(), beeType.ordinal());
- }
-
- public final IBeeDefinition getRainResist() {
- return new BeeVariation.RainResist(this);
- }
-
- private static final Class sGtBees = ReflectionUtils.getClass("gregtech.loaders.misc.GT_BeeDefinition");
-
- public static IAlleleBeeSpecies getGregtechBeeType(String name) {
- try {
- Enum aBeeObject = ReflectionUtils.getEnum(sGtBees, name);
- Field gtBeesField = ReflectionUtils.getField(sGtBees, "species");
- IAlleleBeeSpecies beeType = ReflectionUtils.getFieldValue(gtBeesField, aBeeObject);
- return beeType != null ? beeType : null;
- }
- catch (Throwable t) {
- t.printStackTrace();
- return null;
- }
-
- }
+ private final GTPP_BranchDefinition branch;
+ private final GTPP_AlleleBeeSpecies species;
+ private final Consumer<GTPP_AlleleBeeSpecies> mSpeciesProperties;
+ private final Consumer<IAllele[]> mAlleles;
+ private final Consumer<GTPP_BeeDefinition> mMutations;
+ private IAllele[] template;
+ private IBeeGenome genome;
+
+ GTPP_BeeDefinition(
+ GTPP_BranchDefinition branch,
+ String binomial,
+ Materials aMat,
+ boolean dominant,
+ int primary,
+ int secondary,
+ Consumer<GTPP_AlleleBeeSpecies> aSpeciesProperties,
+ Consumer<IAllele[]> aAlleles,
+ Consumer<GTPP_BeeDefinition> aMutations) {
+ this(
+ branch,
+ binomial,
+ MaterialUtils.generateMaterialFromGtENUM(aMat),
+ dominant,
+ primary,
+ secondary,
+ aSpeciesProperties,
+ aAlleles,
+ aMutations);
+ }
+
+ GTPP_BeeDefinition(
+ GTPP_BranchDefinition branch,
+ String binomial,
+ Material aMat,
+ boolean dominant,
+ int primary,
+ int secondary,
+ Consumer<GTPP_AlleleBeeSpecies> aSpeciesProperties,
+ Consumer<IAllele[]> aAlleles,
+ Consumer<GTPP_BeeDefinition> aMutations) {
+ this.mAlleles = aAlleles;
+ this.mMutations = aMutations;
+ this.mSpeciesProperties = aSpeciesProperties;
+ String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH);
+ String species = WordUtils.capitalize(binomial);
+ String uid = "gtpp.bee.species" + species;
+ String description = "for.description." + species;
+ String name = "for.bees.species." + lowercaseName;
+ GT_LanguageManager.addStringLocalization("for.bees.species." + lowercaseName, species, true);
+ GTPP_Bees.sMaterialMappings.put(binomial.toLowerCase().replaceAll(" ", ""), aMat);
+ this.branch = branch;
+ this.species = new GTPP_AlleleBeeSpecies(
+ uid, dominant, name, "GT++", description, branch.getBranch(), binomial, primary, secondary);
+ }
+
+ public static void initBees() {
+ for (GTPP_BeeDefinition bee : values()) {
+ bee.init();
+ }
+ for (GTPP_BeeDefinition bee : values()) {
+ bee.registerMutations();
+ }
+ }
+
+ protected static IAlleleBeeEffect getEffect(byte modid, String name) {
+ String s;
+ switch (modid) {
+ case GTPP_Bees.EXTRABEES:
+ s = "extrabees.effect." + name;
+ break;
+ case GTPP_Bees.GENDUSTRY:
+ s = "gendustry.effect." + name;
+ break;
+ case GTPP_Bees.MAGICBEES:
+ s = "magicbees.effect" + name;
+ break;
+ case GTPP_Bees.GREGTECH:
+ s = "gregtech.effect" + name;
+ break;
+ default:
+ s = "forestry.effect" + name;
+ break;
+ }
+ return (IAlleleBeeEffect) AlleleManager.alleleRegistry.getAllele(s);
+ }
+
+ protected static IAlleleFlowers getFlowers(byte modid, String name) {
+ String s;
+ switch (modid) {
+ case GTPP_Bees.EXTRABEES:
+ s = "extrabees.flower." + name;
+ break;
+ case GTPP_Bees.GENDUSTRY:
+ s = "gendustry.flower." + name;
+ break;
+ case GTPP_Bees.MAGICBEES:
+ s = "magicbees.flower" + name;
+ break;
+ case GTPP_Bees.GREGTECH:
+ s = "gregtech.flower" + name;
+ break;
+ default:
+ s = "forestry.flowers" + name;
+ break;
+ }
+ return (IAlleleFlowers) AlleleManager.alleleRegistry.getAllele(s);
+ }
+
+ protected static IAlleleBeeSpecies getSpecies(byte modid, String name) {
+ String s;
+ switch (modid) {
+ case GTPP_Bees.EXTRABEES:
+ s = "extrabees.species." + name;
+ break;
+ case GTPP_Bees.GENDUSTRY:
+ s = "gendustry.bee." + name;
+ break;
+ case GTPP_Bees.MAGICBEES:
+ s = "magicbees.species" + name;
+ break;
+ case GTPP_Bees.GREGTECH:
+ s = "gregtech.species" + name;
+ break;
+ default:
+ s = "forestry.species" + name;
+ break;
+ }
+ IAlleleBeeSpecies ret = (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s);
+ return ret;
+ }
+
+ protected final void setSpeciesProperties(GTPP_AlleleBeeSpecies species2) {
+ this.mSpeciesProperties.accept(species2);
+ }
+
+ protected final void setAlleles(IAllele[] template) {
+ this.mAlleles.accept(template);
+ }
+
+ protected final void registerMutations() {
+ this.mMutations.accept(this);
+ }
+
+ private void init() {
+ setSpeciesProperties(species);
+
+ template = branch.getTemplate();
+ AlleleHelper.instance.set(template, SPECIES, species);
+ setAlleles(template);
+
+ genome = BeeManager.beeRoot.templateAsGenome(template);
+
+ BeeManager.beeRoot.registerTemplate(template);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) {
+ return registerMutation(parent1, parent2, chance, 1f);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ GTPP_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance) {
+ return registerMutation(parent1, parent2, chance, 1f);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ IAlleleBeeSpecies parent1, GTPP_BeeDefinition parent2, int chance) {
+ return registerMutation(parent1, parent2, chance, 1f);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ GTPP_BeeDefinition parent1, GTPP_BeeDefinition parent2, int chance) {
+ return registerMutation(parent1, parent2, chance, 1f);
+ }
+
+ protected final IBeeMutationCustom registerMutation(String parent1, String parent2, int chance) {
+ return registerMutation(getGregtechBeeType(parent1), getGregtechBeeType(parent2), chance, 1f);
+ }
+
+ /**
+ * Diese neue Funtion erlaubt Mutationsraten unter 1%. Setze dazu die
+ * Mutationsrate als Bruch mit chance / chancedivider This new function
+ * allows Mutation percentages under 1%. Set them as a fraction with chance
+ * / chancedivider
+ */
+ protected final IBeeMutationCustom registerMutation(
+ IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance, float chancedivider) {
+ return new GTPP_Bee_Mutation(parent1, parent2, this.getTemplate(), chance, chancedivider);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ GTPP_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance, float chancedivider) {
+ return registerMutation(parent1.species, parent2, chance, chancedivider);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ IAlleleBeeSpecies parent1, GTPP_BeeDefinition parent2, int chance, float chancedivider) {
+ return registerMutation(parent1, parent2.species, chance, chancedivider);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ GTPP_BeeDefinition parent1, GTPP_BeeDefinition parent2, int chance, float chancedivider) {
+ return registerMutation(parent1.species, parent2, chance, chancedivider);
+ }
+
+ protected final IBeeMutationCustom registerMutation(
+ String parent1, String parent2, int chance, float chancedivider) {
+ return registerMutation(getGregtechBeeType(parent1), getGregtechBeeType(parent2), chance, chancedivider);
+ }
+
+ @Override
+ public final IAllele[] getTemplate() {
+ return Arrays.copyOf(template, template.length);
+ }
+
+ @Override
+ public final IBeeGenome getGenome() {
+ return genome;
+ }
+
+ @Override
+ public final IBee getIndividual() {
+ return new Bee(genome);
+ }
+
+ @Override
+ public final ItemStack getMemberStack(EnumBeeType beeType) {
+ return BeeManager.beeRoot.getMemberStack(getIndividual(), beeType.ordinal());
+ }
+
+ public final IBeeDefinition getRainResist() {
+ return new BeeVariation.RainResist(this);
+ }
+
+ private static final Class sGtBees = ReflectionUtils.getClass("gregtech.loaders.misc.GT_BeeDefinition");
+
+ public static IAlleleBeeSpecies getGregtechBeeType(String name) {
+ try {
+ Enum aBeeObject = ReflectionUtils.getEnum(sGtBees, name);
+ Field gtBeesField = ReflectionUtils.getField(sGtBees, "species");
+ IAlleleBeeSpecies beeType = ReflectionUtils.getFieldValue(gtBeesField, aBeeObject);
+ return beeType != null ? beeType : null;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ return null;
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java
index 92a2a9fb30..c9bf32d07b 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java
@@ -7,19 +7,18 @@ import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.apiculture.genetics.BeeMutation;
import forestry.core.genetics.mutations.Mutation;
+import java.lang.reflect.Field;
+import java.util.List;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import org.apache.commons.lang3.reflect.FieldUtils;
-import java.lang.reflect.Field;
-import java.util.List;
-
-
public class GTPP_Bee_Mutation extends BeeMutation {
private final float split;
- public GTPP_Bee_Mutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, float split) {
+ public GTPP_Bee_Mutation(
+ IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, float split) {
super(bee0, bee1, result, chance);
this.split = split;
BeeManager.beeRoot.registerMutation(this);
@@ -31,7 +30,12 @@ public class GTPP_Bee_Mutation extends BeeMutation {
}
@Override
- public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, IBeeGenome genome0, IBeeGenome genome1) {
+ public float getChance(
+ IBeeHousing housing,
+ IAlleleBeeSpecies allele0,
+ IAlleleBeeSpecies allele1,
+ IBeeGenome genome0,
+ IBeeGenome genome1) {
World world = housing != null ? housing.getWorld() : null;
ChunkCoordinates housingCoordinates = housing != null ? housing.getCoordinates() : null;
int x = housingCoordinates != null ? housingCoordinates.posX : 0;
@@ -45,7 +49,8 @@ public class GTPP_Bee_Mutation extends BeeMutation {
}
IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
- IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
+ IBeeModifier beeModeModifier =
+ BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance);
processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance);
@@ -54,14 +59,21 @@ public class GTPP_Bee_Mutation extends BeeMutation {
}
@SuppressWarnings("unchecked")
- private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) {
+ private float getBasicChance(
+ World world,
+ int x,
+ int y,
+ int z,
+ IAllele allele0,
+ IAllele allele1,
+ IGenome genome0,
+ IGenome genome1,
+ IClimateProvider climate) {
float mutationChance = this.getBaseChance();
List<IMutationCondition> mutationConditions = null;
Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true);
- if (f == null)
- f = FieldUtils.getField(Mutation.class, "mutationConditions", true);
- if (f == null)
- return mutationChance;
+ if (f == null) f = FieldUtils.getField(Mutation.class, "mutationConditions", true);
+ if (f == null) return mutationChance;
try {
mutationConditions = f.get(this) instanceof List ? (List<IMutationCondition>) f.get(this) : null;
} catch (IllegalAccessException e) {
@@ -70,7 +82,8 @@ public class GTPP_Bee_Mutation extends BeeMutation {
if (mutationConditions != null)
for (IMutationCondition mutationCondition : mutationConditions) {
- mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate);
+ mutationChance *=
+ mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate);
if (mutationChance == 0) {
return 0;
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java
index 14b5a7e8ea..38ba689944 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java
@@ -2,8 +2,6 @@ package gtPlusPlus.xmod.forestry.bees.registry;
import static gregtech.api.enums.GT_Values.MOD_ID_FR;
-import java.util.HashMap;
-
import cpw.mods.fml.common.Loader;
import gregtech.GT_Mod;
import gtPlusPlus.api.objects.Logger;
@@ -12,63 +10,62 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.forestry.bees.handler.*;
import gtPlusPlus.xmod.forestry.bees.items.output.*;
+import java.util.HashMap;
public class GTPP_Bees {
-
- public final static byte FORESTRY = 0;
- public final static byte EXTRABEES = 1;
- public final static byte GENDUSTRY = 2;
- public final static byte MAGICBEES = 3;
- public final static byte GREGTECH = 4;
+
+ public static final byte FORESTRY = 0;
+ public static final byte EXTRABEES = 1;
+ public static final byte GENDUSTRY = 2;
+ public static final byte MAGICBEES = 3;
+ public static final byte GREGTECH = 4;
public static GTPP_Propolis propolis;
public static GTPP_Pollen pollen;
public static GTPP_Drop drop;
public static GTPP_Comb combs;
-
-
+
public static HashMap<String, Material> sMaterialMappings = new HashMap<String, Material>();
- public static HashMap<Integer, GTPP_PropolisType> sPropolisMappings = new HashMap<Integer, GTPP_PropolisType>();
- public static HashMap<Integer, GTPP_PollenType> sPollenMappings = new HashMap<Integer, GTPP_PollenType>();
- public static HashMap<Integer, GTPP_DropType> sDropMappings = new HashMap<Integer, GTPP_DropType>();
- public static HashMap<Integer, GTPP_CombType> sCombMappings = new HashMap<Integer, GTPP_CombType>();
+ public static HashMap<Integer, GTPP_PropolisType> sPropolisMappings = new HashMap<Integer, GTPP_PropolisType>();
+ public static HashMap<Integer, GTPP_PollenType> sPollenMappings = new HashMap<Integer, GTPP_PollenType>();
+ public static HashMap<Integer, GTPP_DropType> sDropMappings = new HashMap<Integer, GTPP_DropType>();
+ public static HashMap<Integer, GTPP_CombType> sCombMappings = new HashMap<Integer, GTPP_CombType>();
public GTPP_Bees() {
if (Loader.isModLoaded(MOD_ID_FR) && GT_Mod.gregtechproxy.mGTBees) {
-
- if (!ReflectionUtils.doesClassExist("gregtech.loaders.misc.GT_BeeDefinition")) {
- CORE.crash("Missing gregtech.loaders.misc.GT_BeeDefinition.");
- }
- else {
- Logger.BEES("Loading GT++ Bees!");
- }
- Logger.BEES("Creating required items.");
+ if (!ReflectionUtils.doesClassExist("gregtech.loaders.misc.GT_BeeDefinition")) {
+ CORE.crash("Missing gregtech.loaders.misc.GT_BeeDefinition.");
+ } else {
+ Logger.BEES("Loading GT++ Bees!");
+ }
+
+ Logger.BEES("Creating required items.");
propolis = new GTPP_Propolis();
pollen = new GTPP_Pollen();
drop = new GTPP_Drop();
combs = new GTPP_Comb();
- Logger.BEES("Loading types.");
+ Logger.BEES("Loading types.");
initTypes();
- Logger.BEES("Adding recipes.");
+ Logger.BEES("Adding recipes.");
GTPP_Drop.initDropsRecipes();
GTPP_Propolis.initPropolisRecipes();
GTPP_Comb.initCombsRecipes();
- Logger.BEES("Initialising bees.");
+ Logger.BEES("Initialising bees.");
GTPP_BeeDefinition.initBees();
-
- Logger.BEES("Done!");
+
+ Logger.BEES("Done!");
}
}
-
+
private static void initTypes() {
- ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.registry.GTPP_BeeDefinition");
- ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType");
- ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType");
- ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PollenType");
- ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType");
+ ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.registry.GTPP_BeeDefinition");
+ ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType");
+ ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType");
+ ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PollenType");
+ ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType");
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java
index 3c7630a434..76e195e9ef 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BranchDefinition.java
@@ -2,9 +2,6 @@ package gtPlusPlus.xmod.forestry.bees.registry;
import static forestry.api.apiculture.EnumBeeChromosome.*;
-import java.util.Arrays;
-import java.util.function.Consumer;
-
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.genetics.IAllele;
@@ -12,9 +9,10 @@ import forestry.api.genetics.IClassification;
import forestry.apiculture.genetics.alleles.AlleleEffect;
import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.EnumAllele.*;
+import java.util.Arrays;
+import java.util.function.Consumer;
public enum GTPP_BranchDefinition {
-
LEGENDARY("gtpp.legendary", "Summa Potestas", alleles -> {
AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_2);
AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_2);
@@ -25,9 +23,7 @@ public enum GTPP_BranchDefinition {
AlleleHelper.instance.set(alleles, FLOWERING, Flowering.SLOW);
AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST);
AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGER);
- }
- )
- ;
+ });
private static IAllele[] defaultTemplate;
private final IClassification branch;
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java
index 9b3424ef08..e8e2922791 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java
@@ -10,14 +10,8 @@
******************************************************************************/
package gtPlusPlus.xmod.forestry.bees.tileentities;
-import java.util.*;
-
-import cpw.mods.fml.common.Optional;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-
import buildcraft.api.statements.ITriggerExternal;
+import cpw.mods.fml.common.Optional;
import forestry.api.apiculture.*;
import forestry.apiculture.ApiaryBeeListener;
import forestry.apiculture.ApiaryBeeModifier;
@@ -28,65 +22,68 @@ import forestry.apiculture.tiles.TileBeeHousingBase;
import forestry.apiculture.trigger.ApicultureTriggers;
import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse;
import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse;
+import java.util.*;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary {
- private final IBeeModifier beeModifier = new ApiaryBeeModifier();
- private final IBeeListener beeListener = new ApiaryBeeListener(this);
- private final InventoryApiary inventory = new InventoryApiary(getAccessHandler());
-
- public TileDenseBeeHouse() {
- super("apiary2");
- setInternalInventory(inventory);
- }
-
- @Override
- public IBeeHousingInventory getBeeInventory() {
- return inventory;
- }
-
- @Override
- public IApiaryInventory getApiaryInventory() {
- return inventory;
- }
-
- @Override
- public Collection<IBeeModifier> getBeeModifiers() {
- List<IBeeModifier> beeModifiers = new ArrayList<>();
-
- beeModifiers.add(beeModifier);
-
- for (IHiveFrame frame : inventory.getFrames()) {
- beeModifiers.add(frame.getBeeModifier());
- }
-
- return beeModifiers;
- }
-
- @Override
- public Iterable<IBeeListener> getBeeListeners() {
- return Collections.singleton(beeListener);
- }
-
- /* ITRIGGERPROVIDER */
- @Optional.Method(modid = "BuildCraftAPI|statements")
- @Override
- public Collection<ITriggerExternal> getExternalTriggers(ForgeDirection side, TileEntity tile) {
- LinkedList<ITriggerExternal> res = new LinkedList<>();
- res.add(ApicultureTriggers.missingQueen);
- res.add(ApicultureTriggers.missingDrone);
- res.add(ApicultureTriggers.noFrames);
- return res;
- }
-
- @Override
- public Object getGui(EntityPlayer player, int data) {
- ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true);
- return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY);
- }
-
- @Override
- public Object getContainer(EntityPlayer player, int data) {
- return new ContainerBeeHouse(player.inventory, this, true);
- }
+ private final IBeeModifier beeModifier = new ApiaryBeeModifier();
+ private final IBeeListener beeListener = new ApiaryBeeListener(this);
+ private final InventoryApiary inventory = new InventoryApiary(getAccessHandler());
+
+ public TileDenseBeeHouse() {
+ super("apiary2");
+ setInternalInventory(inventory);
+ }
+
+ @Override
+ public IBeeHousingInventory getBeeInventory() {
+ return inventory;
+ }
+
+ @Override
+ public IApiaryInventory getApiaryInventory() {
+ return inventory;
+ }
+
+ @Override
+ public Collection<IBeeModifier> getBeeModifiers() {
+ List<IBeeModifier> beeModifiers = new ArrayList<>();
+
+ beeModifiers.add(beeModifier);
+
+ for (IHiveFrame frame : inventory.getFrames()) {
+ beeModifiers.add(frame.getBeeModifier());
+ }
+
+ return beeModifiers;
+ }
+
+ @Override
+ public Iterable<IBeeListener> getBeeListeners() {
+ return Collections.singleton(beeListener);
+ }
+
+ /* ITRIGGERPROVIDER */
+ @Optional.Method(modid = "BuildCraftAPI|statements")
+ @Override
+ public Collection<ITriggerExternal> getExternalTriggers(ForgeDirection side, TileEntity tile) {
+ LinkedList<ITriggerExternal> res = new LinkedList<>();
+ res.add(ApicultureTriggers.missingQueen);
+ res.add(ApicultureTriggers.missingDrone);
+ res.add(ApicultureTriggers.noFrames);
+ return res;
+ }
+
+ @Override
+ public Object getGui(EntityPlayer player, int data) {
+ ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true);
+ return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY);
+ }
+
+ @Override
+ public Object getContainer(EntityPlayer player, int data) {
+ return new ContainerBeeHouse(player.inventory, this, true);
+ }
}