mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-27 06:20:02 +00:00
ff
This commit is contained in:
1 parent
f777ea6b18
commit
75e8c22268
26 files changed
+193
-101
No files matched your search
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class INMS {
|
||||
private static final Version CURRENT = new Version(26, 1, 2, "v26_1_R1");
|
||||
private static final Version CURRENT = new Version(26, 2, 0, "v26_2_R1");
|
||||
|
||||
private static final List<Version> REVISION = List.of(
|
||||
CURRENT
|
||||
@@ -85,7 +85,7 @@ public class INMS {
|
||||
|
||||
MinecraftVersion detectedVersion = getMinecraftVersion();
|
||||
String serverVersion = detectedVersion == null ? Bukkit.getServer().getVersion() : detectedVersion.value();
|
||||
throw new IllegalStateException("Iris requires Minecraft 26.1.2. Detected server version: " + serverVersion);
|
||||
throw new IllegalStateException("Iris requires Minecraft 26.2. Detected server version: " + serverVersion);
|
||||
}
|
||||
|
||||
private static String getTag(List<Version> versions, String def) {
|
||||
|
||||
@@ -37,7 +37,11 @@ import art.arcane.volmlib.util.math.Vector3d;
|
||||
import art.arcane.volmlib.util.nbt.mca.palette.MCABiomeContainer;
|
||||
import art.arcane.volmlib.util.nbt.mca.palette.MCAPaletteAccess;
|
||||
import art.arcane.volmlib.util.nbt.tag.CompoundTag;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@@ -197,7 +201,7 @@ public interface INMSBinding {
|
||||
Color getBiomeColor(Location location, BiomeColor type);
|
||||
|
||||
default DataVersion getDataVersion() {
|
||||
return DataVersion.V26_1_2;
|
||||
return DataVersion.V26_2;
|
||||
}
|
||||
|
||||
default int getSpawnChunkCount(World world) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.function.Supplier;
|
||||
@Getter
|
||||
public enum DataVersion {
|
||||
UNSUPPORTED("0.0.0", 0, () -> null),
|
||||
V26_1_2("26.1.2", 101, DataFixerV1217::new);
|
||||
V26_2("26.2", 107, DataFixerV1217::new);
|
||||
private static final KMap<DataVersion, IDataFixer> cache = new KMap<>();
|
||||
@Getter(AccessLevel.NONE)
|
||||
private final Supplier<IDataFixer> constructor;
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class Tasks {
|
||||
} else if (parts.length >= 2) {
|
||||
supportedVersions = parts[1];
|
||||
} else {
|
||||
supportedVersions = "26.1.2";
|
||||
supportedVersions = "26.2";
|
||||
}
|
||||
|
||||
if (!(INMS.get() instanceof NMSBinding1X)) {
|
||||
|
||||
@@ -114,7 +114,11 @@ public final class EngineBukkitOps {
|
||||
try {
|
||||
Runnable tileTask = () -> {
|
||||
chunk.iterate(TileWrapper.class, (x, y, z, v) -> {
|
||||
Block block = c.getBlock(x & 15, y + engine.getWorld().minHeight(), z & 15);
|
||||
int worldY = y + engine.getWorld().minHeight();
|
||||
if (worldY < c.getWorld().getMinHeight() || worldY >= c.getWorld().getMaxHeight()) {
|
||||
return;
|
||||
}
|
||||
Block block = c.getBlock(x & 15, worldY, z & 15);
|
||||
if (!TileData.setTileState(block, v.getData())) {
|
||||
NamespacedKey blockTypeKey = KeyedType.getKey(block.getType());
|
||||
NamespacedKey tileTypeKey = KeyedType.getKey(v.getData().getMaterial());
|
||||
@@ -127,7 +131,11 @@ public final class EngineBukkitOps {
|
||||
|
||||
Runnable customTask = () -> {
|
||||
chunk.iterate(Identifier.class, (x, y, z, v) -> {
|
||||
IrisServices.get(ExternalDataSVC.class).processUpdate(engine, c.getBlock(x & 15, y + engine.getWorld().minHeight(), z & 15), v);
|
||||
int worldY = y + engine.getWorld().minHeight();
|
||||
if (worldY < c.getWorld().getMinHeight() || worldY >= c.getWorld().getMaxHeight()) {
|
||||
return;
|
||||
}
|
||||
IrisServices.get(ExternalDataSVC.class).processUpdate(engine, c.getBlock(x & 15, worldY, z & 15), v);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -246,6 +254,10 @@ public final class EngineBukkitOps {
|
||||
}
|
||||
|
||||
public static void update(Engine engine, int x, int y, int z, Chunk c, MantleChunk<Matter> mc, RNG rf) {
|
||||
World world = c.getWorld();
|
||||
if (y < world.getMinHeight() || y >= world.getMaxHeight()) {
|
||||
return;
|
||||
}
|
||||
Block block = c.getBlock(x, y, z);
|
||||
BlockData data = block.getBlockData();
|
||||
engine.blockUpdatedMetric();
|
||||
|
||||
Reference in new issue
Block a user