Compare commits

...
4 Commits
Author SHA1 Message Date
Martin Robertz 88a1b2d560 update 2024-12-29 00:13:30 +01:00
Guillaume Mercier 3970cec1af prevent npe and log bad requests (#55)
(cherry picked from commit 7059206cb0)
2024-12-29 00:11:48 +01:00
Martin Robertz 54c702e935 update 2024-11-13 07:12:13 +01:00
Ryan Nasers a3aa358627 Fixing Waila showing incorrect blocks for logs (#54) 2024-11-12 22:04:26 +01:00
6 changed files with 30 additions and 7 deletions

No files matched your search

+3 -3
View File
@@ -1,10 +1,10 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:ForestryMC:4.9.16:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.5.11:dev')
api('com.github.GTNewHorizons:ForestryMC:4.9.20:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.5.23:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.38-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.53-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+1 -1
View File
@@ -17,5 +17,5 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}
@@ -176,4 +176,9 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
return BlockMetadata.getPickBlock(world, x, y, z);
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
return this.getPickBlock(target, world, x, y, z, null);
}
}
@@ -4,6 +4,9 @@ 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;
@@ -20,6 +23,8 @@ 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;
@@ -79,8 +84,21 @@ public class IsolatorComponentLogic extends ComponentProcessSetCost implements I
final IChromosomeType[] karyo = root.getKaryotype();
final IChromosomeType chromosome = karyo[rand.nextInt(karyo.length)];
final IAllele allele = rand.nextBoolean() ? individual.getGenome().getActiveAllele(chromosome)
: individual.getGenome().getInactiveAllele(chromosome);
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;
}
final Gene gene = new Gene(allele, chromosome, root);
ItemStack serum = ItemSequence.create(gene);