Skip to content

Commit ce7e409

Browse files
committed
chore(1.21.10): Add 1.21.10 support
1 parent 57fc2eb commit ce7e409

File tree

9 files changed

+26
-19
lines changed

9 files changed

+26
-19
lines changed

Insights-Core/src/main/java/dev/frankheijden/insights/commands/CommandInsights.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private void showBase(CommandSender sender) {
2424
sender.sendMessage(ColorUtils.colorize(
2525
"&8&l&m---------------=&r&8[ &b&lInsights&8 ]&l&m=----------------",
2626
"&b Plugin version: &a" + plugin.getDescription().getVersion(),
27-
"&b Plugin author: &7FrankHeijden#0099",
27+
"&b Plugin author(s): &7" + String.join(", ", plugin.getDescription().getAuthors()),
2828
"&b Plugin link: &7https://www.spigotmc.org/resources/56489/",
2929
"&b Wiki: &7https://github.com/InsightsPlugin/Insights/wiki",
3030
"&8&m-------------------------------------------------"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dependencies {
2-
paperweight.paperDevBundle("1.21.6-R0.1-SNAPSHOT")
2+
paperweight.paperDevBundle("1.21.10-R0.1-SNAPSHOT")
33
}

Insights-NMS/Current/src/main/java/dev/frankheijden/insights/nms/impl/InsightsNMSImpl.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
import net.minecraft.world.level.block.state.BlockState;
2020
import net.minecraft.world.level.chunk.LevelChunkSection;
2121
import net.minecraft.world.level.chunk.PalettedContainer;
22+
import net.minecraft.world.level.chunk.Strategy;
2223
import net.minecraft.world.level.chunk.status.ChunkStatus;
2324
import net.minecraft.world.level.chunk.storage.SerializableChunkData;
24-
import net.minecraft.world.level.storage.TagValueInput;
25-
import net.minecraft.world.level.storage.ValueInput;
2625
import org.bukkit.Chunk;
2726
import org.bukkit.Material;
2827
import org.bukkit.World;
@@ -90,8 +89,9 @@ public void getUnloadedChunkSections(World world, int chunkX, int chunkZ, Consum
9089
if (sectionIndex < 0 || sectionIndex >= sectionsCount) continue;
9190

9291
PalettedContainer<BlockState> blockStateContainer;
92+
Strategy<BlockState> strategy = serverLevel.palettedContainerFactory().blockStatesStrategy();
9393
if (sectionTag.contains("block_states")) {
94-
Codec<PalettedContainer<BlockState>> blockStateCodec = SerializableChunkData.BLOCK_STATE_CODEC;
94+
Codec<PalettedContainer<BlockState>> blockStateCodec = PalettedContainer.codecRW(BlockState.CODEC, strategy, Blocks.AIR.defaultBlockState(), new BlockState[0]);
9595
dataResult = blockStateCodec.parse(NbtOps.INSTANCE, sectionTag.getCompound("block_states").orElseThrow())
9696
.promotePartial(message -> logger.severe(String.format(
9797
CHUNK_ERROR,
@@ -108,12 +108,13 @@ public void getUnloadedChunkSections(World world, int chunkX, int chunkZ, Consum
108108
throw ex;
109109
}
110110
} else {
111-
blockStateContainer = new PalettedContainer<>(
112-
Block.BLOCK_STATE_REGISTRY,
113-
Blocks.AIR.defaultBlockState(),
114-
PalettedContainer.Strategy.SECTION_STATES,
115-
null
116-
);
111+
blockStateContainer = new PalettedContainer<>(Blocks.AIR.defaultBlockState(), strategy, new BlockState[0]);
112+
// blockStateContainer = new PalettedContainer<BlockState>(
113+
// Block.BLOCK_STATE_REGISTRY,
114+
// Blocks.AIR.defaultBlockState(),
115+
// Strategy.SECTION_STATES,
116+
// null
117+
// );
117118
}
118119

119120
LevelChunkSection chunkSection = new LevelChunkSection(blockStateContainer, null);

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ plugins {
77
`maven-publish`
88
alias(libs.plugins.shadow)
99
alias(libs.plugins.userdev) apply false
10+
alias(libs.plugins.runPaper)
1011
}
1112

1213
val name = "Insights"
1314
group = "dev.frankheijden.insights"
1415
val dependencyDir = "$group.dependencies"
15-
version = "6.19.7"
16+
version = "6.19.8"
1617

1718
subprojects {
1819
apply(plugin = "java")
@@ -162,6 +163,9 @@ tasks {
162163
rename("(.+)Parent(.+)-all(.+)", "$1$2$3")
163164
}
164165

166+
runServer {
167+
minecraftVersion("1.21.10")
168+
}
165169
}
166170

167171
buildscript {

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ placeholderapi = "2.11.6"
1414
commodore = "2.2"
1515
cloudPaper = "2.0.0-beta.9"
1616
cloud = "2.0.0-rc.2"
17+
runPaper = "2.3.1"
1718

1819
# plugins
1920
shadow = "9.0.0-beta2"
20-
userdev = "2.0.0-beta.17"
21+
userdev = "2.0.0-beta.19"
2122
pluginYml = "0.6.0"
2223

2324
[libraries]
@@ -43,3 +44,4 @@ cloudAnnotations = { group = "org.incendo", name = "cloud-annotations", version.
4344
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
4445
userdev = { id = "io.papermc.paperweight.userdev", version.ref = "userdev" }
4546
pluginYml = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginYml" }
47+
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper"}

gradle/wrapper/gradle-wrapper.jar

181 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -205,15 +205,15 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.
212212

213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)