From c9af0cbd260e92fa0470ac278f4c639499abd07e Mon Sep 17 00:00:00 2001 From: Alexander Anishin Date: Sat, 16 Nov 2024 10:16:36 +0300 Subject: [PATCH 1/2] Fixed NPE in logic of radioactive effect --- .../genetics/alleles/AlleleEffectRadioactive.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java index 52e4f6780c..06ba776419 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java @@ -13,6 +13,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; import net.minecraft.world.World; @@ -107,11 +108,8 @@ private static void destroyEnvironment(IBeeGenome genome, IBeeHousing housing) { } // Some mods might use this logic? Idk, just a safety check. Might stop griefing. - if (!world.canMineBlock( - housing.getWorld().func_152378_a(housing.getOwner().getId()), - posHousing.x, - posHousing.y, - posHousing.z)) { + EntityPlayer player = world.func_152378_a(housing.getOwner().getId()); + if (player == null || !world.canMineBlock(player, posHousing.x, posHousing.y, posHousing.z)) { continue; } From 4e8a872f0c105e5aa43caecc40a04082400c86cb Mon Sep 17 00:00:00 2001 From: Alexander Anishin Date: Sat, 16 Nov 2024 10:18:19 +0300 Subject: [PATCH 2/2] Updated buildscript --- settings.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index 3d3ba12c7c..aa612ade0c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29' }