Skip to content

Commit 1a4947c

Browse files
authored
Merge branch 'v3.0' into 1.21.1-fabric-port
2 parents b9f56e2 + 89fbc21 commit 1a4947c

File tree

132 files changed

+9341
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+9341
-101
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@
3737
/fabric-1.16.1_server.launch
3838
/fabric-1.16.2_client.launch
3939
/fabric-1.16.2_server.launch
40+

DynmapCore/src/main/java/org/dynmap/WebAuthManager.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,36 +182,36 @@ public boolean processWebRegisterCommand(DynmapCore core, DynmapCommandSender se
182182
boolean other = false;
183183
if(args.length > 1) {
184184
if(!core.checkPlayerPermission(sender, "webregister.other")) {
185-
sender.sendMessage("Not authorized to set web login information for other players");
185+
sender.sendMessage("You're not authorised to access web registration info for other players");
186186
return true;
187187
}
188188
uid = args[1];
189189
other = true;
190190
}
191191
else if (player == null) { /* Console? */
192-
sender.sendMessage("Must provide user ID to register web login");
192+
sender.sendMessage("Must provide username to access web registration info");
193193
return true;
194194
}
195195
else {
196196
uid = player.getName();
197197
}
198198
if (checkUserName(uid) == false) {
199-
sender.sendMessage("Invalid user ID");
199+
sender.sendMessage("Invalid username. Did you type it correctly?");
200200
return true;
201201
}
202202
String regkey = String.format("%04d-%04d", rnd.nextInt(10000), rnd.nextInt(10000));
203203
pending_registrations.put(uid.toLowerCase(), regkey.toLowerCase());
204-
sender.sendMessage("Registration pending for user ID: " + uid);
204+
sender.sendMessage("Registration pending for username: " + uid);
205205
sender.sendMessage("Registration code: " + regkey);
206206
publicRegistrationURL = core.configuration.getString("publicURL", "index.html");
207-
sender.sendMessage("Enter ID and code on registration web page (" + publicRegistrationURL.toString() + ") to complete registration");
207+
sender.sendMessage("Enter username and registration code when prompted on web page (" + publicRegistrationURL.toString() + ") to complete registration");
208208
if(other) {
209209
DynmapPlayer p = core.getServer().getPlayer(uid);
210-
if(p != null) {
210+
if(p != null && sender != p) {
211211
p.sendMessage("The registration of your account for web access has been started.");
212212
p.sendMessage("To complete the process, access the Login page on the Dynmap map");
213213
p.sendMessage("Registration code: " + regkey);
214-
p.sendMessage("The user ID must match your account ID, but the password should NOT be the same.");
214+
p.sendMessage("Enter your username and registration code when prompted on web page (" + publicRegistrationURL.toString() + ") to complete registration");
215215
}
216216
}
217217
core.events.trigger("loginupdated", null);

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 */

DynmapCore/src/main/resources/extracted/web/login.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ <h2>Minecraft Dynamic Map - Login/Register</h2>
6262
<tr><td class='login'>
6363
<FORM METHOD=POST name=login ACTION="up/login">
6464
<p>
65-
Enter user ID and password:
65+
Enter username and password:
6666
<BR>
6767
<BR>
6868
<table>
69-
<tr><td>User ID</td><td><input type="text" size="20" name="j_username"></td></tr>
69+
<tr><td>Username</td><td><input type="text" size="20" name="j_username"></td></tr>
7070
<tr><td>Password</td><td><input type="password" size="20" name="j_password"></td></tr>
7171
</table>
7272
<BR>
@@ -80,11 +80,11 @@ <h2>Minecraft Dynamic Map - Login/Register</h2>
8080
<td class='register'>
8181
<FORM METHOD=POST name=register ACTION="up/register">
8282
<p>
83-
Run '/dynmap webregister' and enter returned registration code, along with userid and password:
83+
Run '/dynmap webregister' and enter your username and registration code, and create a password:
8484
<BR>
8585
<BR>
8686
<table>
87-
<tr><td>User ID</td><td><input type="text" size="20" name="j_username"></td></tr>
87+
<tr><td>Username</td><td><input type="text" size="20" name="j_username"></td></tr>
8888
<tr><td>Password</td><td><input type="password" size="20" name="j_password"></td></tr>
8989
<tr><td>Verify Password</td><td><input type="password" size="20" name="j_verify_password"></td></tr>
9090
<tr><td>Registration Code</td><td><input type="text" size="20" name="j_passcode"></td></tr>

DynmapCore/src/main/resources/models_1.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3451,8 +3451,10 @@ modellist:id=%dropper,state=facing:down,box=0.000000/0.000000/0.000000:16.000000
34513451
[1.20.3-]modellist:id=%polished_tuff_slab,state=type:bottom,box=0.000000/0.000000/0.000000:16.000000/8.000000/16.000000:n/0/0.000000/8.000000/16.000000/16.000000:w/0/0.000000/8.000000/16.000000/16.000000:e/0/0.000000/8.000000/16.000000/16.000000:s/0/0.000000/8.000000/16.000000/16.000000:u/0/0.000000/0.000000/16.000000/16.000000:d/0/0.000000/0.000000/16.000000/16.000000
34523452
[1.20.3-]customblock:id=%polished_tuff_stairs,class=org.dynmap.hdmap.renderer.StairStateRenderer
34533453
[1.20.3-]customblock:id=%polished_tuff_wall,class=org.dynmap.hdmap.renderer.FenceWallBlockStateRenderer,type=tallwall
3454-
[1.20.3-]customblock:id=%polished_tuff_stairs,class=org.dynmap.hdmap.renderer.StairStateRenderer
3455-
[1.20.3-]customblock:id=%polished_tuff_wall,class=org.dynmap.hdmap.renderer.FenceWallBlockStateRenderer,type=tallwall
3454+
[1.20.3-]customblock:id=%tuff_brick_stairs,class=org.dynmap.hdmap.renderer.StairStateRenderer
3455+
[1.20.3-]modellist:id=%tuff_brick_slab,state=type:top,box=0.000000/8.000000/0.000000:16.000000/16.000000/16.000000:n/0/0.000000/0.000000/16.000000/8.000000:w/0/0.000000/0.000000/16.000000/8.000000:e/0/0.000000/0.000000/16.000000/8.000000:s/0/0.000000/0.000000/16.000000/8.000000:u/0/0.000000/0.000000/16.000000/16.000000:d/0/0.000000/0.000000/16.000000/16.000000
3456+
[1.20.3-]modellist:id=%tuff_brick_slab,state=type:bottom,box=0.000000/0.000000/0.000000:16.000000/8.000000/16.000000:n/0/0.000000/8.000000/16.000000/16.000000:w/0/0.000000/8.000000/16.000000/16.000000:e/0/0.000000/8.000000/16.000000/16.000000:s/0/0.000000/8.000000/16.000000/16.000000:u/0/0.000000/0.000000/16.000000/16.000000:d/0/0.000000/0.000000/16.000000/16.000000
3457+
[1.20.3-]customblock:id=%tuff_brick_wall,class=org.dynmap.hdmap.renderer.FenceWallBlockStateRenderer,type=tallwall
34563458
[1.20.3-]customblock:id=%copper_door,id=%exposed_copper_door,id=%oxidized_copper_door,id=%weathered_copper_door,class=org.dynmap.hdmap.renderer.DoorStateRenderer
34573459
[1.20.3-]customblock:id=%waxed_copper_door,id=%waxed_exposed_copper_door,id=%waxed_oxidized_copper_door,id=%waxed_weathered_copper_door,class=org.dynmap.hdmap.renderer.DoorStateRenderer
34583460

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ allprojects {
4141
apply plugin: 'java'
4242

4343
group = 'us.dynmap'
44-
version = '3.7-beta-7'
44+
version = '3.7-SNAPSHOT'
4545

4646
}
4747

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();

0 commit comments

Comments
 (0)