mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 01:49:30 +00:00
build(core): 更新 boosted-yaml依赖并优化代码
- 将 boosted-yaml 依赖从本地文件改为 Maven 仓库引用 -优化 FriendlyByteBuf 类中的 readLongArray 方法签名
This commit is contained in:
@@ -13,7 +13,7 @@ dependencies {
|
||||
// JOML
|
||||
compileOnly("org.joml:joml:1.10.8")
|
||||
// YAML
|
||||
implementation(files("libs/boosted-yaml-${rootProject.properties["boosted_yaml_version"]}.jar"))
|
||||
implementation("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
|
||||
compileOnly("org.yaml:snakeyaml:${rootProject.properties["snake_yaml_version"]}")
|
||||
// NBT
|
||||
implementation("com.github.Xiao-MoMi:sparrow-nbt:${rootProject.properties["sparrow_nbt_version"]}")
|
||||
|
||||
@@ -221,11 +221,11 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
return this.readLongArray(null);
|
||||
}
|
||||
|
||||
public long[] readLongArray(long @Nullable [] toArray) {
|
||||
public long[] readLongArray(@Nullable long[] toArray) {
|
||||
return this.readLongArray(toArray, this.readableBytes() / 8);
|
||||
}
|
||||
|
||||
public long[] readLongArray(long @Nullable [] toArray, int maxSize) {
|
||||
public long[] readLongArray(@Nullable long[] toArray, int maxSize) {
|
||||
int arraySize = this.readVarInt();
|
||||
if (toArray == null || toArray.length != arraySize) {
|
||||
if (arraySize > maxSize) {
|
||||
|
||||
Reference in New Issue
Block a user