Skip to content

Commit

Permalink
Merge pull request #4164 from jacob1/v3.0
Browse files Browse the repository at this point in the history
Support Spigot/Paper 1.21.3 and 1.21.4
  • Loading branch information
mikeprimm authored Jan 5, 2025
2 parents 30d6845 + 9bb99d1 commit 29e2065
Show file tree
Hide file tree
Showing 21 changed files with 1,373 additions and 17 deletions.
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

0 comments on commit 29e2065

Please sign in to comment.