Skip to content

Commit

Permalink
Fix sub-builders not working in CustomLevelBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Jan 2, 2025
1 parent 105091d commit 3cb4b0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repositories {
}

dependencies {
include(modImplementation("net.casualchampionships:arcade:0.4.0-beta.1+1.21.4")!!)
include(modImplementation("net.casualchampionships:arcade:0.4.0-beta.2+1.21.4")!!)
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public class CustomLevelBuilder {
*/
public fun weather(modifier: WeatherProperties.() -> Unit): CustomLevelBuilder {
val weather = this.properties.weather.orElseGet(::WeatherProperties)
this.properties.weather = Optional.of(weather)
weather.modifier()
return this
}
Expand All @@ -272,6 +273,7 @@ public class CustomLevelBuilder {
*/
public fun difficulty(builder: DifficultyProperties.() -> Unit): CustomLevelBuilder {
val difficulty = this.properties.difficulty.orElseGet(::DifficultyProperties)
this.properties.difficulty = Optional.of(difficulty)
difficulty.builder()
return this
}
Expand All @@ -295,6 +297,7 @@ public class CustomLevelBuilder {
*/
public fun gameRules(builder: GameRules.() -> Unit): CustomLevelBuilder {
val rules = this.properties.gameRules.orElseGet { GameRules(FeatureFlagSet.of()) }
this.properties.gameRules = Optional.of(rules)
rules.builder()
return this
}
Expand Down Expand Up @@ -394,7 +397,6 @@ public class CustomLevelBuilder {
return this.dimensionType(Holder.direct(type))
}


/**
* Sets the chunk generator.
*
Expand All @@ -408,7 +410,6 @@ public class CustomLevelBuilder {
return this
}


/**
* Sets the world seed.
*
Expand All @@ -430,7 +431,6 @@ public class CustomLevelBuilder {
return this
}


/**
* Sets whether the world is considered to be flat.
*
Expand All @@ -450,7 +450,6 @@ public class CustomLevelBuilder {
return this
}


/**
* Sets whether the world should tick time.
*
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
java
}

val modVersion = "0.4.0-beta.1"
val modVersion = "0.4.0-beta.2"

allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
Expand Down

0 comments on commit 3cb4b0c

Please sign in to comment.