mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-03-13 13:57:48 +08:00
Make Paperweight adapter run on 1.18rc3.
This commit is contained in:
parent
44d91b0c73
commit
979b522738
@ -186,8 +186,8 @@ public PaperweightAdapter() throws NoSuchFieldException, NoSuchMethodException {
|
||||
CraftServer.class.cast(Bukkit.getServer());
|
||||
|
||||
int dataVersion = CraftMagicNumbers.INSTANCE.getDataVersion();
|
||||
if (dataVersion != 2730) {
|
||||
throw new UnsupportedClassVersionError("Not 1.17.1!");
|
||||
if (dataVersion != 2858) { // 1.18 release should be 2859
|
||||
throw new UnsupportedClassVersionError("Not 1.18!");
|
||||
}
|
||||
|
||||
serverWorldsField = CraftServer.class.getDeclaredField("worlds");
|
||||
|
@ -55,7 +55,7 @@
|
||||
"compileOnly"("io.papermc.paper:paper-api:1.17-R0.1-SNAPSHOT") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
"implementation"("io.papermc:paperlib:1.0.6")
|
||||
"implementation"("io.papermc:paperlib:1.0.8-SNAPSHOT")
|
||||
"compileOnly"("com.sk89q:dummypermscompat:1.10")
|
||||
"implementation"("org.bstats:bstats-bukkit:2.1.0")
|
||||
"implementation"("it.unimi.dsi:fastutil")
|
||||
|
@ -519,7 +519,7 @@ public boolean useItem(BlockVector3 position, BaseItem item, Direction face) {
|
||||
@Override
|
||||
public boolean fullySupports3DBiomes() {
|
||||
// Supports if API does and we're not in the overworld
|
||||
return HAS_3D_BIOMES && getWorld().getEnvironment() != World.Environment.NORMAL;
|
||||
return HAS_3D_BIOMES && (getWorld().getEnvironment() != World.Environment.NORMAL || PaperLib.isVersion(18));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
Loading…
Reference in New Issue
Block a user