-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
118 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
src/testmod/java/xyz/nucleoid/fantasy/FantasyInitializer.java
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
src/testmod/java/xyz/nucleoid/fantasy/test/FantasyInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package xyz.nucleoid.fantasy.test; | ||
|
||
import com.mojang.brigadier.CommandDispatcher; | ||
import net.fabricmc.api.ModInitializer; | ||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; | ||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; | ||
import net.minecraft.server.command.ServerCommandSource; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.registry.Registry; | ||
import xyz.nucleoid.fantasy.Fantasy; | ||
import xyz.nucleoid.fantasy.RuntimeWorldConfig; | ||
import xyz.nucleoid.fantasy.util.VoidChunkGenerator; | ||
|
||
public final class FantasyInitializer implements ModInitializer { | ||
@Override | ||
public void onInitialize() { | ||
ServerLifecycleEvents.SERVER_STARTED.register((s) -> { | ||
Fantasy.get(s).openTemporaryWorld(new RuntimeWorldConfig().setGenerator(new VoidChunkGenerator(s.getRegistryManager().get(Registry.BIOME_KEY).getEntry(0).get()))); | ||
Fantasy.get(s).getOrOpenPersistentWorld( | ||
new Identifier("fantasytest:test"), | ||
new RuntimeWorldConfig() | ||
.setGenerator(s.getOverworld().getChunkManager().getChunkGenerator()) | ||
); | ||
}); | ||
} | ||
|
||
} |