File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/world/bentobox/level/calculators Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -646,8 +646,13 @@ private CompletableFuture<Void> handleSpawners() {
646646 for (Map .Entry <Location , Boolean > en : this .spawners .entrySet ()) {
647647 CompletableFuture <Void > future = Util .getChunkAtAsync (en .getKey ()).thenAccept (c -> {
648648 if (en .getKey ().getBlock ().getType () == Material .SPAWNER ) {
649- CreatureSpawner cs = (CreatureSpawner ) en .getKey ().getBlock ().getState ();
650- checkSpawner (cs .getSpawnedType (), en .getValue ());
649+ EntityType et = ((CreatureSpawner ) en .getKey ().getBlock ().getState ()).getSpawnedType ();
650+ if (et != null ) {
651+ checkSpawner (et , en .getValue ());
652+ } else {
653+ // This spawner has no spawning capability. Just list it as a spawner block
654+ checkBlock (Material .SPAWNER , en .getValue ());
655+ }
651656 }
652657 });
653658 futures .add (future );
You can’t perform that action at this time.
0 commit comments