mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-02-23 13:30:12 +08:00
Clean up forge gradle script, apply the chorus plant fix to forge/fabric world.
This commit is contained in:
parent
a8656c5f24
commit
46de95ff3c
@ -487,6 +487,9 @@ public boolean generateTree(TreeType type, EditSession editSession, BlockVector3
|
|||||||
ConfiguredFeature<?, ?> generator = createTreeFeatureGenerator(type);
|
ConfiguredFeature<?, ?> generator = createTreeFeatureGenerator(type);
|
||||||
ServerLevel world = (ServerLevel) getWorld();
|
ServerLevel world = (ServerLevel) getWorld();
|
||||||
ServerChunkCache chunkManager = world.getChunkSource();
|
ServerChunkCache chunkManager = world.getChunkSource();
|
||||||
|
if (type == TreeType.CHORUS_PLANT) {
|
||||||
|
position = position.add(0, 1, 0);
|
||||||
|
}
|
||||||
return generator != null && generator.place(
|
return generator != null && generator.place(
|
||||||
world, chunkManager.getGenerator(), random,
|
world, chunkManager.getGenerator(), random,
|
||||||
FabricAdapter.toBlockPos(position)
|
FabricAdapter.toBlockPos(position)
|
||||||
|
@ -17,12 +17,13 @@
|
|||||||
}
|
}
|
||||||
val forgeVersion = "38.0.10"
|
val forgeVersion = "38.0.10"
|
||||||
|
|
||||||
val apiClasspath = configurations.create("apiClasspath")
|
val apiClasspath = configurations.create("apiClasspath") {
|
||||||
apiClasspath.isCanBeResolved = true
|
isCanBeResolved = true
|
||||||
configurations.api.get().extendsFrom(apiClasspath)
|
extendsFrom(configurations.api.get())
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"apiClasspath"(project(":worldedit-core"))
|
"api"(project(":worldedit-core"))
|
||||||
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
|
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
|
||||||
because("Mojang provides Log4J at 2.14.1")
|
because("Mojang provides Log4J at 2.14.1")
|
||||||
})
|
})
|
||||||
@ -31,10 +32,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure<UserDevExtension> {
|
configure<UserDevExtension> {
|
||||||
mappings(mapOf(
|
mappings("official", minecraftVersion)
|
||||||
"channel" to "official",
|
|
||||||
"version" to minecraftVersion
|
|
||||||
))
|
|
||||||
|
|
||||||
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
|
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
|
||||||
|
|
||||||
@ -46,14 +44,12 @@
|
|||||||
))
|
))
|
||||||
workingDirectory = project.file("run").canonicalPath
|
workingDirectory = project.file("run").canonicalPath
|
||||||
source(sourceSets["main"])
|
source(sourceSets["main"])
|
||||||
|
lazyToken("minecraft_classpath") {
|
||||||
|
apiClasspath.resolve().joinToString(File.pathSeparator) { it.absolutePath }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
create("client", runConfig)
|
create("client", runConfig)
|
||||||
create("server", runConfig)
|
create("server", runConfig)
|
||||||
all {
|
|
||||||
lazyToken("minecraft_classpath") {
|
|
||||||
apiClasspath.copyRecursive().resolve().joinToString(File.pathSeparator) { it.absolutePath }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -484,6 +484,9 @@ public boolean generateTree(TreeType type, EditSession editSession, BlockVector3
|
|||||||
ConfiguredFeature<?, ?> generator = createTreeFeatureGenerator(type);
|
ConfiguredFeature<?, ?> generator = createTreeFeatureGenerator(type);
|
||||||
ServerLevel world = getWorld();
|
ServerLevel world = getWorld();
|
||||||
ServerChunkCache chunkManager = world.getChunkSource();
|
ServerChunkCache chunkManager = world.getChunkSource();
|
||||||
|
if (type == TreeType.CHORUS_PLANT) {
|
||||||
|
position = position.add(0, 1, 0);
|
||||||
|
}
|
||||||
return generator != null && generator.place(
|
return generator != null && generator.place(
|
||||||
world, chunkManager.getGenerator(), random, ForgeAdapter.toBlockPos(position)
|
world, chunkManager.getGenerator(), random, ForgeAdapter.toBlockPos(position)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user