mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-01-18 12:34:20 +08:00
feat: implement recently-added tree types to tree generator (#2332)
* feat: implement recently-added tree types to tree generator * fix: add mappings to implementation worlds * Use later API version to fix tests --------- Co-authored-by: Madeline Miller <mnmiller1@me.com>
This commit is contained in:
parent
1f22906aca
commit
4892e056cf
@ -42,7 +42,7 @@
|
||||
"api"(project(":worldedit-libs:bukkit"))
|
||||
// Technically this is api, but everyone should already have some form of the bukkit API
|
||||
// Avoid pulling in another one, especially one so outdated.
|
||||
"localImplementation"("org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT") {
|
||||
"localImplementation"("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT") {
|
||||
exclude("junit", "junit")
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
"localImplementation"("org.apache.logging.log4j:log4j-api")
|
||||
|
||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
||||
"compileOnly"("io.papermc.paper:paper-api:1.17-R0.1-SNAPSHOT") {
|
||||
"compileOnly"("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT") {
|
||||
exclude("org.slf4j", "slf4j-api")
|
||||
exclude("junit", "junit")
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
import org.bukkit.permissions.PermissionAttachment;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -144,6 +145,11 @@ public UUID getUniqueId() {
|
||||
return randomUuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayerProfile getPlayerProfile() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBanned() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@ -278,4 +284,9 @@ public void decrementStatistic(Statistic statistic, EntityType entityType, int a
|
||||
public void setStatistic(Statistic statistic, EntityType entityType, int newValue) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getLastDeathLocation() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +108,9 @@ public boolean generate(EditSession editSession, BlockVector3 pos) throws MaxCha
|
||||
return editSession.getWorld().generateTree(this, editSession, pos.subtract(0, 1, 0));
|
||||
}
|
||||
},
|
||||
MANGROVE("Mangrove tree", "mangrove"),
|
||||
TALL_MANGROVE("Tall mangrove tree", "tall_mangrove"),
|
||||
CHERRY("Cherry blossom", "cherry"),
|
||||
RANDOM("Random tree", "rand", "random") {
|
||||
@Override
|
||||
public boolean generate(EditSession editSession, BlockVector3 pos) throws MaxChangedBlocksException {
|
||||
|
@ -446,6 +446,9 @@ private List<CompletableFuture<ChunkAccess>> submitChunkLoadTasks(Region region,
|
||||
case WARPED_FUNGUS -> TreeFeatures.WARPED_FUNGUS;
|
||||
case CRIMSON_FUNGUS -> TreeFeatures.CRIMSON_FUNGUS;
|
||||
case CHORUS_PLANT -> EndFeatures.CHORUS_PLANT;
|
||||
case MANGROVE -> TreeFeatures.MANGROVE;
|
||||
case TALL_MANGROVE -> TreeFeatures.TALL_MANGROVE;
|
||||
case CHERRY -> TreeFeatures.CHERRY;
|
||||
case RANDOM -> createTreeFeatureGenerator(TreeType.values()[ThreadLocalRandom.current().nextInt(TreeType.values().length)]);
|
||||
default -> null;
|
||||
};
|
||||
|
@ -432,6 +432,9 @@ private List<CompletableFuture<ChunkAccess>> submitChunkLoadTasks(Region region,
|
||||
case WARPED_FUNGUS -> TreeFeatures.WARPED_FUNGUS;
|
||||
case CRIMSON_FUNGUS -> TreeFeatures.CRIMSON_FUNGUS;
|
||||
case CHORUS_PLANT -> EndFeatures.CHORUS_PLANT;
|
||||
case MANGROVE -> TreeFeatures.MANGROVE;
|
||||
case TALL_MANGROVE -> TreeFeatures.TALL_MANGROVE;
|
||||
case CHERRY -> TreeFeatures.CHERRY;
|
||||
case RANDOM -> createTreeFeatureGenerator(TreeType.values()[ThreadLocalRandom.current().nextInt(TreeType.values().length)]);
|
||||
default -> null;
|
||||
};
|
||||
|
@ -314,6 +314,9 @@ public boolean regenerate(Region region, Extent extent, RegenOptions options) {
|
||||
case WARPED_FUNGUS -> TreeFeatures.WARPED_FUNGUS;
|
||||
case CRIMSON_FUNGUS -> TreeFeatures.CRIMSON_FUNGUS;
|
||||
case CHORUS_PLANT -> EndFeatures.CHORUS_PLANT;
|
||||
case MANGROVE -> TreeFeatures.MANGROVE;
|
||||
case TALL_MANGROVE -> TreeFeatures.TALL_MANGROVE;
|
||||
case CHERRY -> TreeFeatures.CHERRY;
|
||||
case RANDOM -> createTreeFeatureGenerator(TreeGenerator.TreeType.values()[ThreadLocalRandom.current().nextInt(TreeGenerator.TreeType.values().length)]);
|
||||
default -> null;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user