mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 17:24:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fa9a5d81e | ||
|
|
4ed8496342 | ||
|
|
d6f4305ad9 | ||
|
|
f431507d8b | ||
|
|
73d5cf353f | ||
|
|
ef0de4c86c | ||
|
|
03d1177079 | ||
|
|
8a47994438 | ||
|
|
1a3b24c589 | ||
|
|
d77c705d54 | ||
|
|
3222bf35ca | ||
|
|
56c2e72748 | ||
|
|
0f2e6bd76e | ||
|
|
880f952d0f | ||
|
|
5db9be848f | ||
|
|
57345f4daa | ||
|
|
ccd425de9d | ||
|
|
df042779de | ||
|
|
162ac5a46c | ||
|
|
1077567cc3 | ||
|
|
a5ac246a28 |
No files matched your search
@@ -33,7 +33,8 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
name = ExtraBees.EB_MOD_NAME,
|
||||
version = Tags.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:BinnieCore")
|
||||
dependencies = "after:BinnieCore",
|
||||
guiFactory = "binnie.extrabees.config.EBConfigGUIFactory")
|
||||
public class ExtraBees extends AbstractMod {
|
||||
|
||||
public static final String EB_MODID = "ExtraBees";
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package binnie.extrabees.config;
|
||||
|
||||
import static binnie.extrabees.ExtraBees.EB_MODID;
|
||||
import static binnie.extrabees.ExtraBees.EB_MOD_NAME;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig;
|
||||
|
||||
public class EBConfigGUI extends SimpleGuiConfig {
|
||||
|
||||
public EBConfigGUI(GuiScreen parent) throws ConfigException {
|
||||
super(parent, EB_MODID, EB_MOD_NAME, false, EBConfig.class, EBConfigMachines.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package binnie.extrabees.config;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory;
|
||||
|
||||
public class EBConfigGUIFactory implements SimpleGuiFactory {
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return EBConfigGUI.class;
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,8 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
name = EB_MOD_NAME,
|
||||
version = Tags.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:BinnieCore")
|
||||
dependencies = "after:BinnieCore",
|
||||
guiFactory = "binnie.extratrees.config.ETConfigGUIFactory")
|
||||
public class ExtraTrees extends AbstractMod {
|
||||
|
||||
public static final String ET_MODID = "ExtraTrees";
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package binnie.extratrees.config;
|
||||
|
||||
import static binnie.extratrees.ExtraTrees.EB_MOD_NAME;
|
||||
import static binnie.extratrees.ExtraTrees.ET_MODID;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig;
|
||||
|
||||
public class ETConfigGUI extends SimpleGuiConfig {
|
||||
|
||||
public ETConfigGUI(GuiScreen parent) throws ConfigException {
|
||||
super(parent, ETConfig.class, ET_MODID, EB_MOD_NAME);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package binnie.extratrees.config;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory;
|
||||
|
||||
public class ETConfigGUIFactory implements SimpleGuiFactory {
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return ETConfigGUI.class;
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,6 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import binnie.core.genetics.Gene;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.inventory.IChargedSlots;
|
||||
@@ -24,8 +21,6 @@ import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public class IsolatorComponentLogic extends ComponentProcessSetCost implements IProcess {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger("Genetics");
|
||||
|
||||
protected float enzymePerProcess = 0.5f;
|
||||
protected float ethanolPerProcess = 10.0f;
|
||||
|
||||
@@ -84,22 +79,14 @@ public class IsolatorComponentLogic extends ComponentProcessSetCost implements I
|
||||
}
|
||||
|
||||
final IChromosomeType[] karyo = root.getKaryotype();
|
||||
final IChromosomeType chromosome = karyo[rand.nextInt(karyo.length)];
|
||||
final IAllele allele;
|
||||
try {
|
||||
allele = rand.nextBoolean() ? individual.getGenome().getActiveAllele(chromosome)
|
||||
: individual.getGenome().getInactiveAllele(chromosome);
|
||||
} catch (NullPointerException npe) {
|
||||
// just return and eat the power without eating the rest of it
|
||||
LOG.warn(
|
||||
"NPE occurred on unknown gene: name: " + chromosome.getName()
|
||||
+ " | ordinal: "
|
||||
+ chromosome.ordinal()
|
||||
+ " | is null? "
|
||||
+ (individual.getGenome().getChromosomes()[chromosome.ordinal()] == null ? "true"
|
||||
: "false"));
|
||||
return;
|
||||
}
|
||||
|
||||
IChromosomeType chromosome;
|
||||
do {
|
||||
chromosome = karyo[rand.nextInt(karyo.length)];
|
||||
} while (individual.getGenome().getChromosomes()[chromosome.ordinal()] == null);
|
||||
|
||||
final IAllele allele = rand.nextBoolean() ? individual.getGenome().getActiveAllele(chromosome)
|
||||
: individual.getGenome().getInactiveAllele(chromosome);
|
||||
final Gene gene = new Gene(allele, chromosome, root);
|
||||
|
||||
ItemStack serum = ItemSequence.create(gene);
|
||||
|
||||
Reference in new issue
Block a user