mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-03 21:21:28 +01:00
Merge branch 'development'
This commit is contained in:
commit
f8946d8aea
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -129,7 +129,7 @@ public enum CompatibleBiome {
|
||||
}
|
||||
}
|
||||
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15)) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15) && ServerVersion.isServerVersionBelow(ServerVersion.V1_18)) {
|
||||
try {
|
||||
Class<?> classBiomeBase = ClassMapping.BIOME_BASE.getClazz(),
|
||||
classCraftChunk = ClassMapping.CRAFT_CHUNK.getClazz(),
|
||||
@ -207,7 +207,7 @@ public enum CompatibleBiome {
|
||||
Object biomeStorage = null;
|
||||
Object biomeBase = null;
|
||||
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15)) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15) && ServerVersion.isServerVersionBelow(ServerVersion.V1_18)) {
|
||||
nmsChunk = methodGetHandle.invoke(chunk);
|
||||
biomeStorage = methodGetBiomeIndex.invoke(nmsChunk);
|
||||
|
||||
@ -224,11 +224,15 @@ public enum CompatibleBiome {
|
||||
int chunkZ = chunk.getZ();
|
||||
for (int x = chunkX << 4; x < (chunkX << 4) + 16; x++) {
|
||||
for (int z = chunkZ << 4; z < (chunkZ << 4) + 16; z++) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15)) {
|
||||
for (int y = 0; y < world.getMaxHeight(); ++y) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_18)) {
|
||||
chunk.getWorld().setBiome(x, y, z, getBiome());
|
||||
} else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15) && ServerVersion.isServerVersionBelow(ServerVersion.V1_18)) {
|
||||
methodSetBiome.invoke(biomeStorage, x >> 2, y >> 2, z >> 2, biomeBase);
|
||||
}
|
||||
}
|
||||
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -236,7 +240,7 @@ public enum CompatibleBiome {
|
||||
}
|
||||
}
|
||||
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15)) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_15) && ServerVersion.isServerVersionBelow(ServerVersion.V1_18)) {
|
||||
methodMarkDirty.invoke(nmsChunk);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,14 @@ public enum MethodMapping {
|
||||
CB_ITEM_STACK__AS_NMS_COPY("asNMSCopy", ItemStack.class),
|
||||
CB_ITEM_STACK__AS_CRAFT_MIRROR("asCraftMirror", ClassMapping.ITEM_STACK.getClazz()),
|
||||
|
||||
MC_NBT_TAG_LIST__ADD("a", "add", "add", ClassMapping.NBT_BASE.getClazz());
|
||||
MC_NBT_TAG_LIST__ADD("a", "add", "add", ClassMapping.NBT_BASE.getClazz()),
|
||||
|
||||
WORLD_BOARDER__SET_CENTER("setCenter", "setCenter", "c", double.class, double.class),
|
||||
WORLD_BOARDER__SET_SIZE("setSize", "setSize", "a", double.class),
|
||||
|
||||
WORLD_BOARDER__SET_WARNING_TIME("setWarningTime", "setWarningTime", "b", int.class),
|
||||
WORLD_BOARDER__SET_WARNING_DISTANCE("setWarningDistance", "setWarningDistance", "c", int.class),
|
||||
WORLD_BOARDER__TRANSITION_SIZE_BETWEEN("transitionSizeBetween", "transitionSizeBetween", "a", double.class, double.class, long.class);
|
||||
|
||||
private final String _1_14;
|
||||
private final String _1_17;
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class SongodaCore {
|
||||
/**
|
||||
* @since coreRevision 6
|
||||
*/
|
||||
private final static String coreVersion = "2.6.3";
|
||||
private final static String coreVersion = "2.6.4";
|
||||
|
||||
/**
|
||||
* This is specific to the website api
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.core.world;
|
||||
|
||||
import com.songoda.core.compatibility.ClassMapping;
|
||||
import com.songoda.core.compatibility.MethodMapping;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.nms.NmsManager;
|
||||
import com.songoda.core.utils.NMSUtils;
|
||||
@ -60,20 +61,19 @@ public class SWorldBorder {
|
||||
NMSUtils.setField(worldBorder, "world", worldServer, false);
|
||||
}
|
||||
|
||||
Method setCenter = worldBorder.getClass().getMethod("setCenter", double.class, double.class);
|
||||
Method setCenter = MethodMapping.WORLD_BOARDER__SET_CENTER.getMethod(ClassMapping.WORLD_BORDER.getClazz());
|
||||
setCenter.invoke(worldBorder, centerLocation.getX(), centerLocation.getZ());
|
||||
|
||||
Method setSize = worldBorder.getClass().getMethod("setSize", double.class);
|
||||
Method setSize = MethodMapping.WORLD_BOARDER__SET_SIZE.getMethod(ClassMapping.WORLD_BORDER.getClazz());
|
||||
setSize.invoke(worldBorder, size);
|
||||
|
||||
Method setWarningTime = worldBorder.getClass().getMethod("setWarningTime", int.class);
|
||||
Method setWarningTime = MethodMapping.WORLD_BOARDER__SET_WARNING_TIME.getMethod(ClassMapping.WORLD_BORDER.getClazz());
|
||||
setWarningTime.invoke(worldBorder, 0);
|
||||
|
||||
Method setWarningDistance = worldBorder.getClass().getMethod("setWarningDistance", int.class);
|
||||
Method setWarningDistance = MethodMapping.WORLD_BOARDER__SET_WARNING_DISTANCE.getMethod(ClassMapping.WORLD_BORDER.getClazz());
|
||||
setWarningDistance.invoke(worldBorder, 0);
|
||||
|
||||
Method transitionSizeBetween = worldBorder.getClass().getMethod("transitionSizeBetween", double.class,
|
||||
double.class, long.class);
|
||||
Method transitionSizeBetween = MethodMapping.WORLD_BOARDER__TRANSITION_SIZE_BETWEEN.getMethod(ClassMapping.WORLD_BORDER.getClazz());
|
||||
|
||||
if (color == Color.Green) {
|
||||
transitionSizeBetween.invoke(worldBorder, size - 0.1D, size, Long.MAX_VALUE);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore-Modules</artifactId>
|
||||
<version>2.6.3</version>
|
||||
<version>2.6.4</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user