Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Spigot/Paper 1.21.3 and 1.21.4 #4164

Merged
merged 4 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ public GenericMapChunkCache(GenericChunkCache c) {

public void setChunks(DynmapWorld dw, List<DynmapChunk> chunks) {
this.dw = dw;
nsect = (dw.worldheight - dw.minY) >> 4;
sectoff = (-dw.minY) >> 4;
nsect = (int)Math.ceil((dw.worldheight - dw.minY) / 16.0);
sectoff = (int)(Math.ceil((-dw.minY) / 16.0));
this.chunks = chunks;

/* Compute range */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public void initializeBlockStates() {
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
// Fill in base attributes
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
if (bd.e()) { bld.setSolid(); }
if (bd.i()) { bld.setAir(); }
if (bd.a(TagsBlock.t)) { bld.setLog(); }
Expand Down Expand Up @@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public void initializeBlockStates() {
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
// Fill in base attributes
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
if (bd.e()) { bld.setSolid(); }
if (bd.i()) { bld.setAir(); }
if (bd.a(TagsBlock.t)) { bld.setLog(); }
Expand Down Expand Up @@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public void initializeBlockStates() {
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
// Fill in base attributes
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
if (bd.e()) { bld.setSolid(); }
if (bd.i()) { bld.setAir(); }
if (bd.a(TagsBlock.t)) { bld.setLog(); }
Expand Down Expand Up @@ -376,7 +375,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public void initializeBlockStates() {
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
// Fill in base attributes
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
if (bd.e()) { bld.setSolid(); }
if (bd.i()) { bld.setAir(); }
if (bd.a(TagsBlock.t)) { bld.setLog(); }
Expand Down Expand Up @@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
NBTBase val = rec.c(field);
if(val == null) return null;
if(val instanceof NBTTagByte) {
return ((NBTTagByte)val).h();
return ((NBTTagByte)val).i();
}
else if(val instanceof NBTTagShort) {
return ((NBTTagShort)val).g();
Expand Down
1 change: 1 addition & 0 deletions bukkit-helper-121-3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
17 changes: 17 additions & 0 deletions bukkit-helper-121-3/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
eclipse {
project {
name = "Dynmap(Spigot-1.21.3)"
}
}

description = 'bukkit-helper-1.21.3'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(17) // Need this here so eclipse task generates correctly.

dependencies {
implementation project(':bukkit-helper')
implementation project(':dynmap-api')
implementation project(path: ':DynmapCore', configuration: 'shadow')
compileOnly group: 'org.spigotmc', name: 'spigot-api', version:'1.21.3-R0.1-SNAPSHOT'
compileOnly group: 'org.spigotmc', name: 'spigot', version:'1.21.3-R0.1-SNAPSHOT'
}
Loading