Skip to content

Commit

Permalink
Merge pull request #223 from Jsinco/main
Browse files Browse the repository at this point in the history
1.21.3 Support
  • Loading branch information
FrankHeijden authored Dec 1, 2024
2 parents 546e56e + b6d557f commit 3dfa420
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Changelog
- Fix /scanworld command parser, thx @ben9964 <3
- 1.21.3 Support by @Jsinco (removes support for <= 1.21.2)
2 changes: 1 addition & 1 deletion Insights-NMS/Current/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.3-R0.1-SNAPSHOT")
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.frankheijden.insights.nms.impl;

import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
import ca.spottedleaf.moonrise.patches.chunk_system.io.RegionFileIOThread;
import ca.spottedleaf.concurrentutil.util.Priority;
import ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import dev.frankheijden.insights.nms.core.ChunkEntity;
Expand All @@ -20,7 +20,7 @@
import net.minecraft.world.level.chunk.LevelChunkSection;
import net.minecraft.world.level.chunk.PalettedContainer;
import net.minecraft.world.level.chunk.status.ChunkStatus;
import net.minecraft.world.level.chunk.storage.ChunkSerializer;
import net.minecraft.world.level.chunk.storage.SerializableChunkData;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void getUnloadedChunkSections(World world, int chunkX, int chunkZ, Consum

PalettedContainer<BlockState> blockStateContainer;
if (sectionTag.contains("block_states", Tag.TAG_COMPOUND)) {
Codec<PalettedContainer<BlockState>> blockStateCodec = ChunkSerializer.BLOCK_STATE_CODEC;
Codec<PalettedContainer<BlockState>> blockStateCodec = SerializableChunkData.BLOCK_STATE_CODEC;
dataResult = blockStateCodec.parse(
NbtOps.INSTANCE,
sectionTag.getCompound("block_states")
Expand Down Expand Up @@ -125,12 +125,12 @@ public void getUnloadedChunkEntities(
Consumer<ChunkEntity> entityConsumer
) throws IOException {
var serverLevel = ((CraftWorld) world).getHandle();
CompoundTag tag = RegionFileIOThread.loadData(
CompoundTag tag = MoonriseRegionFileIO.loadData(
serverLevel,
chunkX,
chunkZ,
RegionFileIOThread.RegionFileType.ENTITY_DATA,
PrioritisedExecutor.Priority.BLOCKING
MoonriseRegionFileIO.RegionFileType.ENTITY_DATA,
Priority.BLOCKING
);
if (tag == null) return;

Expand Down
15 changes: 2 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ plugins {
val name = "Insights"
group = "dev.frankheijden.insights"
val dependencyDir = "$group.dependencies"
version = "6.19.2"
version = "6.19.3"

subprojects {
apply(plugin = "java")
apply(plugin = "checkstyle")
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "com.gradleup.shadow")

version = rootProject.version

Expand Down Expand Up @@ -157,17 +157,6 @@ tasks.register<Copy>("copyJars") {
}

buildscript {
// tmp workaround for the shadow plugin + Java 21:
// https://github.com/johnrengelman/shadow/pull/876#issuecomment-1942380071
configurations {
classpath {
resolutionStrategy {
force("org.ow2.asm:asm:9.6")
force("org.ow2.asm:asm-commons:9.6")
}
}
}

dependencies {
classpath("io.github.z4kn4fein:semver:2.0.0")
}
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
# libraries
semver = "0.10.2"
minecraft = "1.21-R0.1-SNAPSHOT"
minecraft = "1.21.3-R0.1-SNAPSHOT"
paperLib = "1.0.8"
bStats = "3.0.0"
adventure = "4.17.0"
Expand All @@ -10,14 +10,14 @@ assertj = "3.23.1"
mockito = "4.11.0"
jupiter = "5.9.1"
brigadier = "1.0.18"
placeholderapi = "2.11.4"
placeholderapi = "2.11.6"
commodore = "2.2"
cloudPaper = "2.0.0-beta.9"
cloud = "2.0.0-rc.2"

# plugins
shadow = "8.1.1"
userdev = "1.7.1"
shadow = "9.0.0-beta2"
userdev = "1.7.5"
pluginYml = "0.6.0"

[libraries]
Expand All @@ -40,6 +40,6 @@ cloudPaper = { group = "org.incendo", name = "cloud-paper", version.ref = "cloud
cloudAnnotations = { group = "org.incendo", name = "cloud-annotations", version.ref = "cloud" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
userdev = { id = "io.papermc.paperweight.userdev", version.ref = "userdev" }
pluginYml = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginYml" }

0 comments on commit 3dfa420

Please sign in to comment.