Skip to content

Commit

Permalink
Update to latest plasmid
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatcore committed Aug 13, 2020
1 parent 323bfc8 commit 62762c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Plasmid
modImplementation "xyz.nucleoid:plasmid:0.1.0+build.64"
modImplementation "xyz.nucleoid:plasmid:0.1.0+build.72"

// modRuntime ("com.github.jellysquid3:sodium-fabric:b9c2ad3c38b16275cf2f1a81dcfb2fee1563905b")
// modRuntime ("com.github.jellysquid3:phosphor-fabric:0749029a498e8f6574643285bae7aecb2eda76b8")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version=1.16.2
yarn_mappings=1.16.2+build.6
loader_version=0.9.1+build.205
# Mod Properties
mod_version=1.1.10
mod_version=1.1.11
maven_group=fr.catcore
archives_base_name=deacoudre
# Dependencies
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/fr/catcore/deacoudre/game/DeACoudreWaiting.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Vec3d;
import xyz.nucleoid.plasmid.game.ConfiguredGame;
import xyz.nucleoid.plasmid.game.GameOpenContext;
import xyz.nucleoid.plasmid.game.GameWorld;
import xyz.nucleoid.plasmid.game.StartResult;
import xyz.nucleoid.plasmid.game.config.PlayerConfig;
Expand Down Expand Up @@ -36,18 +38,18 @@ private DeACoudreWaiting(GameWorld gameWorld, DeACoudreMap map, DeACoudreConfig
this.spawnLogic = new DeACoudreSpawnLogic(gameWorld, map);
}

public static CompletableFuture<Void> open(MinecraftServer minecraftServer, DeACoudreConfig config) {
DeACoudreMapGenerator generator = new DeACoudreMapGenerator(config.mapConfig);
public static CompletableFuture<Void> open(GameOpenContext<DeACoudreConfig> gameOpenContext) {
DeACoudreMapGenerator generator = new DeACoudreMapGenerator(gameOpenContext.getConfig().mapConfig);

return generator.create().thenAccept(map -> {
BubbleWorldConfig worldConfig = new BubbleWorldConfig()
.setGenerator(map.asGenerator(minecraftServer))
.setGenerator(map.asGenerator(gameOpenContext.getServer()))
.setDefaultGameMode(GameMode.SPECTATOR)
.setSpawnPos(new Vec3d(0,3,0));

GameWorld gameWorld = GameWorld.open(minecraftServer, worldConfig);
GameWorld gameWorld = gameOpenContext.openWorld(worldConfig);

DeACoudreWaiting waiting = new DeACoudreWaiting(gameWorld, map, config);
DeACoudreWaiting waiting = new DeACoudreWaiting(gameWorld, map, gameOpenContext.getConfig());

gameWorld.openGame(builder -> {
builder.setRule(GameRule.CRAFTING, RuleResult.DENY);
Expand Down

0 comments on commit 62762c8

Please sign in to comment.