Skip to content

Commit

Permalink
invert natural blocking logic #216
Browse files Browse the repository at this point in the history
  • Loading branch information
Xalcon committed Jul 28, 2023
1 parent 5d6a270 commit bec5170
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ public static void onFinalizeSpawn(MobSpawnEvent.FinalizeSpawn event)
if(event.isSpawnCancelled()) return;

// Check if the spawn was intentional (i.e. player invoked), we dont block those
if(isIntentionalSpawn(event.getSpawnType())) return;
if(isIntentionalSpawn(event.getSpawnType()))
return;

if(!TorchmasterConfig.GENERAL.aggressiveSpawnChecks.get() && event.getResult() == Event.Result.ALLOW) return;
if(TorchmasterConfig.GENERAL.blockOnlyNaturalSpawns.get())
{
if(isNaturalSpawn(event.getSpawnType())) return;
if(!isNaturalSpawn(event.getSpawnType())) return;
}

var entity = event.getEntity();
Expand Down

0 comments on commit bec5170

Please sign in to comment.