Skip to content

Commit

Permalink
Fix #601
Browse files Browse the repository at this point in the history
  • Loading branch information
Corosauce committed Dec 3, 2023
1 parent 4e01c67 commit a4a74f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/weather2/weathersystem/storm/StormObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,12 @@ public void tickProgression() {
if (world.getGameTime() % ConfigStorm.Storm_AllTypes_TickRateDelay == 0) {

//boolean debug = false;
Player player = world.getPlayerByUUID(UUID.fromString(spawnerUUID));
//can be null if spawned via server console
Player player = getPlayer();
CompoundTag playerNBT = null;
if (player != null) {
playerNBT = player.getPersistentData();
} else {
Weather.dbg("this should never happen aaaaaaaaaaaaaaa");
playerNBT = new CompoundTag();
}
//CompoundTag playerNBT = PlayerData.getPlayerNBT(spawnerUUID);
Expand Down Expand Up @@ -1297,7 +1297,7 @@ public void tickProgression() {
}

if (isInOcean && (ConfigStorm.Storm_OddsTo1OfOceanBasedStorm > 0 && rand.nextInt(ConfigStorm.Storm_OddsTo1OfOceanBasedStorm) == 0)) {
Player entP = world.getPlayerByUUID(UUID.fromString(spawnerUUID));
Player entP = getPlayer();

if (entP != null) {
initRealStorm(entP, null);
Expand All @@ -1311,7 +1311,7 @@ public void tickProgression() {
playerNBT.putLong("lastStormDeadlyTime", world.getGameTime());
}
} else if ((!isInOcean && randomChanceOfCollideLand > 0 && rand.nextInt(randomChanceOfCollideLand) == 0)) {
Player entP = world.getPlayerByUUID(UUID.fromString(spawnerUUID));
Player entP = getPlayer();

if (entP != null) {
initRealStorm(entP, null);
Expand Down Expand Up @@ -1356,7 +1356,7 @@ public void tickProgression() {
playerNBT.putLong("lastStormDeadlyTime", world.getGameTime());

//EntityPlayer entP = manager.getWorld().getClosestPlayer(pos.x, pos.y, pos.z, -1);
Player entP = world.getPlayerByUUID(UUID.fromString(spawnerUUID));
Player entP = getPlayer();

if (entP != null) {
initRealStorm(entP, so);
Expand Down

0 comments on commit a4a74f5

Please sign in to comment.