Skip to content

Commit 29e2065

Browse files
authored
Merge pull request #4164 from jacob1/v3.0
Support Spigot/Paper 1.21.3 and 1.21.4
2 parents 30d6845 + 9bb99d1 commit 29e2065

File tree

21 files changed

+1373
-17
lines changed

21 files changed

+1373
-17
lines changed

DynmapCore/src/main/java/org/dynmap/common/chunk/GenericMapChunkCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ public GenericMapChunkCache(GenericChunkCache c) {
618618

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

625625
/* Compute range */

bukkit-helper-119-3/src/main/java/org/dynmap/bukkit/helper/v119_3/BukkitVersionHelperSpigot119_3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public Object getFieldValue(Object nbt, String field) {
368368
NBTBase val = rec.c(field);
369369
if(val == null) return null;
370370
if(val instanceof NBTTagByte) {
371-
return ((NBTTagByte)val).h();
371+
return ((NBTTagByte)val).i();
372372
}
373373
else if(val instanceof NBTTagShort) {
374374
return ((NBTTagShort)val).g();

bukkit-helper-119-4/src/main/java/org/dynmap/bukkit/helper/v119_4/BukkitVersionHelperSpigot119_4.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public Object getFieldValue(Object nbt, String field) {
376376
NBTBase val = rec.c(field);
377377
if(val == null) return null;
378378
if(val instanceof NBTTagByte) {
379-
return ((NBTTagByte)val).h();
379+
return ((NBTTagByte)val).i();
380380
}
381381
else if(val instanceof NBTTagShort) {
382382
return ((NBTTagShort)val).g();

bukkit-helper-120-2/src/main/java/org/dynmap/bukkit/helper/v120_2/BukkitVersionHelperSpigot120_2.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void initializeBlockStates() {
185185
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
186186
// Fill in base attributes
187187
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
188-
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
189188
if (bd.e()) { bld.setSolid(); }
190189
if (bd.i()) { bld.setAir(); }
191190
if (bd.a(TagsBlock.t)) { bld.setLog(); }
@@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
374373
NBTBase val = rec.c(field);
375374
if(val == null) return null;
376375
if(val instanceof NBTTagByte) {
377-
return ((NBTTagByte)val).h();
376+
return ((NBTTagByte)val).i();
378377
}
379378
else if(val instanceof NBTTagShort) {
380379
return ((NBTTagShort)val).g();

bukkit-helper-120-4/src/main/java/org/dynmap/bukkit/helper/v120_4/BukkitVersionHelperSpigot120_4.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void initializeBlockStates() {
185185
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
186186
// Fill in base attributes
187187
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
188-
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
189188
if (bd.e()) { bld.setSolid(); }
190189
if (bd.i()) { bld.setAir(); }
191190
if (bd.a(TagsBlock.t)) { bld.setLog(); }
@@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
374373
NBTBase val = rec.c(field);
375374
if(val == null) return null;
376375
if(val instanceof NBTTagByte) {
377-
return ((NBTTagByte)val).h();
376+
return ((NBTTagByte)val).i();
378377
}
379378
else if(val instanceof NBTTagShort) {
380379
return ((NBTTagShort)val).g();

bukkit-helper-120-5/src/main/java/org/dynmap/bukkit/helper/v120_5/BukkitVersionHelperSpigot120_5.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void initializeBlockStates() {
185185
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
186186
// Fill in base attributes
187187
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
188-
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
189188
if (bd.e()) { bld.setSolid(); }
190189
if (bd.i()) { bld.setAir(); }
191190
if (bd.a(TagsBlock.t)) { bld.setLog(); }
@@ -376,7 +375,7 @@ public Object getFieldValue(Object nbt, String field) {
376375
NBTBase val = rec.c(field);
377376
if(val == null) return null;
378377
if(val instanceof NBTTagByte) {
379-
return ((NBTTagByte)val).h();
378+
return ((NBTTagByte)val).i();
380379
}
381380
else if(val instanceof NBTTagShort) {
382381
return ((NBTTagShort)val).g();

bukkit-helper-120/src/main/java/org/dynmap/bukkit/helper/v120/BukkitVersionHelperSpigot120.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public void initializeBlockStates() {
185185
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
186186
// Fill in base attributes
187187
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
188-
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
189188
if (bd.e()) { bld.setSolid(); }
190189
if (bd.i()) { bld.setAir(); }
191190
if (bd.a(TagsBlock.t)) { bld.setLog(); }
@@ -374,7 +373,7 @@ public Object getFieldValue(Object nbt, String field) {
374373
NBTBase val = rec.c(field);
375374
if(val == null) return null;
376375
if(val instanceof NBTTagByte) {
377-
return ((NBTTagByte)val).h();
376+
return ((NBTTagByte)val).i();
378377
}
379378
else if(val instanceof NBTTagShort) {
380379
return ((NBTTagShort)val).g();

bukkit-helper-121-3/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/

bukkit-helper-121-3/build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
eclipse {
2+
project {
3+
name = "Dynmap(Spigot-1.21.3)"
4+
}
5+
}
6+
7+
description = 'bukkit-helper-1.21.3'
8+
9+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(17) // Need this here so eclipse task generates correctly.
10+
11+
dependencies {
12+
implementation project(':bukkit-helper')
13+
implementation project(':dynmap-api')
14+
implementation project(path: ':DynmapCore', configuration: 'shadow')
15+
compileOnly group: 'org.spigotmc', name: 'spigot-api', version:'1.21.3-R0.1-SNAPSHOT'
16+
compileOnly group: 'org.spigotmc', name: 'spigot', version:'1.21.3-R0.1-SNAPSHOT'
17+
}

0 commit comments

Comments
 (0)