Skip to content

Commit

Permalink
refactor: plugins are now able to create their own world generator im…
Browse files Browse the repository at this point in the history
…plementation
  • Loading branch information
smartcmd committed Jan 22, 2025
1 parent 9102353 commit 2ba578b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Unless otherwise specified, any version comparison below is the comparison of se
- World will be skipped if failed to be load.
- Main thread will sleep a short time if gui is enabled when the server exits abnormally. This gives user time to see what goes wrong.

### Fixed

- Plugins are able to create their own world generator implementation now. In previous versions a ClassCastException would be thrown when
initializing the dimension.

## [0.1.3](https://github.com/AllayMC/Allay/releases/tag/0.1.3) (API 0.4.0) - 2025-1-17

<small>[Compare with 0.1.2](https://github.com/AllayMC/Allay/compare/0.1.2...0.1.3)</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public final class AllayChunkService implements ChunkService {
private int removeUnneededChunkCycle = Server.SETTINGS.worldSettings().removeUnneededChunkCycle();

public void startTick() {
((AllayWorldGenerator) worldGenerator).startTick();
if (worldGenerator instanceof AllayWorldGenerator allayWorldGenerator) {
// This make plugins able to create their own world generator implementation
allayWorldGenerator.startTick();
}
}

public void tick(long currentTick) {
Expand Down

0 comments on commit 2ba578b

Please sign in to comment.