Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE in logic of radioactive effect #83

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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