Skip to content

Commit

Permalink
Fix NPE in logic of radioactive effect (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
OneEyeMaker authored Nov 16, 2024
1 parent 137927b commit 3c6d5d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
}


Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3c6d5d0

Please sign in to comment.