webbukkit / dynmap

A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations.
https://www.reddit.com/r/Dynmap/
Apache License 2.0
2.05k stars 418 forks source link

Dynmap 1.15 & 1.15.1 #2689

Closed Blueeyestar closed 4 years ago

Blueeyestar commented 4 years ago

It's that time again and Mojang has given a new Minecraft version. And many sleepless nights to solve problems. I have now loaded the latest Spigot 1.15 version and Dynmap would have to be adjusted.

[01:52:07] [Server thread/ERROR]: [dynmap] Unable to find method getById for net.minecraft.server.v1_15_R1.Block [01:52:07] [Server thread/ERROR]: [dynmap] Unable to find method a for net.minecraft.server.v1_15_R1.BiomeBase [01:52:07] [Server thread/INFO]: [dynmap] Unload queue not found - default to unload all chunks [01:52:07] [Server thread/INFO]: [dynmap] inhabitedTicks field not found - inhabited shader not functional [01:52:07] [Server thread/ERROR]: Error initializing dynmap - bukkit version incompatible! initializing dynmap v3.0-beta-5-218 (Is it up to date?) java.lang.IllegalArgumentException: Error initializing dynmap - bukkit version incompatible! at org.dynmap.bukkit.helper.BukkitVersionHelperGeneric.(BukkitVersionHelperGeneric.java:159) ~[?:?] at org.dynmap.bukkit.helper.BukkitVersionHelperCB.(BukkitVersionHelperCB.java:45) ~[?:?] at org.dynmap.bukkit.Helper.getHelper(Helper.java:55) ~[?:?] at org.dynmap.bukkit.DynmapPlugin.onLoad(DynmapPlugin.java:791) ~[?:?] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:356) [minecraft_server.jar:git-Spigot-530f668-de42aa1] at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:202) [minecraft_server.jar:git-Spigot-530f668-de42aa1] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:783) [minecraft_server.jar:git-Spigot-530f668-de42aa1] at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]

Tilerphy commented 4 years ago

I removed all conditions but BukkitVersionHelper.helper = new BukkitVersionHelperSpigot114_1(); for temp.

it just works but I don't know if it is safe.

↑↑↑↑↑↑↑↑↑↑↑↑

Sorry for that, is not works.

Furuss commented 4 years ago

@Tilerphy Can you tell me more? Id like to get it going at 1.15 to

Tsoccerguy3 commented 4 years ago

Tilerphy , I just pulled your git and compiled and tested with spigot 1.15 , its not working unless there are commits that you have not pushed yet

MJRLegends commented 4 years ago

That doesnt work theres other changes that need to be made such as biome chunk mapping

Tilerphy commented 4 years ago

@Tsoccerguy3 @Furuss I cannot build it now, too. The mave pom file cannot be downloaded today. as the pom is online file, I cannot modify it and I don't know the new path of that pom files.

-=--=-=-=-= I tried a moment ago, it was failed. sorry for that.

Tsoccerguy3 commented 4 years ago

https://github.com/webbukkit/dynmap/pull/2670 . is your compile issue because of this maven change

Tilerphy commented 4 years ago

I do these in my repo.:

  1. write a bukkit_helper for 1.15R1
  2. change some code
  3. change the gradle settings

I really built a jar, but when I loaded it in my spigot 1.15, the map view is black, all black. I found some functions of IBlockData had been changed. But I don't know what changed, so I can do nothing after that.

Tsoccerguy3 commented 4 years ago

Mojang/Microsoft has released the deobfuscated source for some of the code , get that and you will have the names functions and methods .

Blueeyestar commented 4 years ago

has mikeprimm already written a word about the 1.15?

MJRLegends commented 4 years ago

@tilerphy more changes needed for chunk mapping code

MJRLegends commented 4 years ago

In MapChunkCache class for 1.15

pk910 commented 4 years ago

Seems like minecraft supports multiple biomes on different y levels now. I've got a running version for 1.15 / 1.15.1, but it's definitely just a hack till there is proper support available. I clearly had no Idea what I'm doing at some parts of the patch.. It uses hard-coded y=64 for getting the biome of a location. (Thrown away older forge support as my java version was too high to build them)

dynmap-1.15.1-experimental3.zip This works fine on my server (in the meantime till proper support is built in)

Patch: https://github.com/pk910/dynmap/commit/a117a2913b0bf2e6e305e9d91398a3973a4efac8

Edit: Replaced link to experimental2 build. First version had an issue with the new BiomStorage format. See comment below.

Edit 2: Replaced link to experimental3 build. Added support for 1.15.1

DefinePvP commented 4 years ago

That zip works fine for me also.

MJRLegends commented 4 years ago

@pk910 Nice work, maybe make a pull request with your changes, you never know they could be perfect

iruis commented 4 years ago
diff --git a/build.gradle b/build.gradle
index a1e9a0e3..92bbd828 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,7 +13,7 @@ allprojects  {
      maven { url "http://repo.mikeprimm.com" }
      maven { url "http://repo.maven.apache.org/maven2" }
      maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
-     maven { url "http://repo.bstats.org/content/repositories/releases/" }
+     maven { url "https://repo.codemc.org/repository/maven-public/" }
   }

   apply plugin: 'java'
diff --git a/bukkit-helper-114-1/build.gradle b/bukkit-helper-114-1/build.gradle
index 4e2e14e8..08a70441 100644
--- a/bukkit-helper-114-1/build.gradle
+++ b/bukkit-helper-114-1/build.gradle
@@ -5,6 +5,6 @@ dependencies {
   compile project(':bukkit-helper')
   compile project(':dynmap-api')
   compile project(path: ':DynmapCore', configuration: 'shadow')
-  compile group: 'org.bukkit', name: 'bukkit', version:'1.14.1-R0.1-SNAPSHOT'
-  compile group: 'org.bukkit', name: 'craftbukkit', version:'1.14.1-R0.1-SNAPSHOT'
+  compile group: 'org.bukkit', name: 'bukkit', version:'1.15-R0.1-SNAPSHOT'
+  compile group: 'org.bukkit', name: 'craftbukkit', version:'1.15-R0.1-SNAPSHOT'
 }
diff --git a/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/BukkitVersionHelperSpigot114_1.java b/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/BukkitVersionHelperSpigot114_1.java
index ba5cd292..10d59ee7 100644
--- a/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/BukkitVersionHelperSpigot114_1.java
+++ b/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/BukkitVersionHelperSpigot114_1.java
@@ -19,13 +19,13 @@ import org.dynmap.renderer.DynmapBlockState;
 import org.dynmap.utils.MapChunkCache;
 import org.dynmap.utils.Polygon;

-import net.minecraft.server.v1_14_R1.BiomeBase;
-import net.minecraft.server.v1_14_R1.Block;
-import net.minecraft.server.v1_14_R1.BlockFluids;
-import net.minecraft.server.v1_14_R1.BlockLogAbstract;
-import net.minecraft.server.v1_14_R1.IBlockData;
-import net.minecraft.server.v1_14_R1.IRegistry;
-import net.minecraft.server.v1_14_R1.Material;
+import net.minecraft.server.v1_15_R1.BiomeBase;
+import net.minecraft.server.v1_15_R1.Block;
+import net.minecraft.server.v1_15_R1.BlockFluids;
+import net.minecraft.server.v1_15_R1.BlockLogAbstract;
+import net.minecraft.server.v1_15_R1.IBlockData;
+import net.minecraft.server.v1_15_R1.IRegistry;
+import net.minecraft.server.v1_15_R1.Material;

 /**
  * Helper for isolation of bukkit version specific issues
@@ -130,7 +130,7 @@ public class BukkitVersionHelperSpigot114_1 extends BukkitVersionHelperCB {
            }
            Material mat = bd.getMaterial();
             DynmapBlockState bs = new DynmapBlockState(lastbs, idx, bname, sb, mat.toString());
-            if ((!bd.p().isEmpty()) && ((bd.getBlock() instanceof BlockFluids) == false)) {    // Test if fluid type for block is not empty
+            if ((!bd.getFluid().isEmpty()) && ((bd.getBlock() instanceof BlockFluids) == false)) { // Test if fluid type for block is not empty
                bs.setWaterlogged();
             }
             if (mat == Material.AIR) {
@@ -168,7 +168,7 @@ public class BukkitVersionHelperSpigot114_1 extends BukkitVersionHelperCB {
     */
     @Override
    public int getBiomeBaseWaterMult(Object bb) {
-       return ((BiomeBase)bb).m();
+       return ((BiomeBase)bb).o();
    }

     /** Get temperature from biomebase */
diff --git a/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/MapChunkCache114_1.java b/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/MapChunkCache114_1.java
index 5c2f4ef2..e0b5cbfc 100644
--- a/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/MapChunkCache114_1.java
+++ b/bukkit-helper-114-1/src/main/java/org/dynmap/bukkit/helper/v114_1/MapChunkCache114_1.java
@@ -2,7 +2,7 @@ package org.dynmap.bukkit.helper.v114_1;

 import org.bukkit.block.Biome;
 import org.bukkit.craftbukkit.libs.jline.internal.Log;
-import org.bukkit.craftbukkit.v1_14_R1.CraftWorld;
+import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;

 import java.io.IOException;
 import java.util.Arrays;
@@ -19,12 +19,12 @@ import org.dynmap.renderer.DynmapBlockState;
 import org.dynmap.utils.DynIntHashMap;
 import org.dynmap.utils.VisibilityLimit;

-import net.minecraft.server.v1_14_R1.Chunk;
-import net.minecraft.server.v1_14_R1.ChunkCoordIntPair;
-import net.minecraft.server.v1_14_R1.ChunkRegionLoader;
-import net.minecraft.server.v1_14_R1.DataBits;
-import net.minecraft.server.v1_14_R1.NBTTagCompound;
-import net.minecraft.server.v1_14_R1.NBTTagList;
+import net.minecraft.server.v1_15_R1.Chunk;
+import net.minecraft.server.v1_15_R1.ChunkCoordIntPair;
+import net.minecraft.server.v1_15_R1.ChunkRegionLoader;
+import net.minecraft.server.v1_15_R1.DataBits;
+import net.minecraft.server.v1_15_R1.NBTTagCompound;
+import net.minecraft.server.v1_15_R1.NBTTagList;

 /**
  * Container for managing chunks - dependent upon using chunk snapshots, since rendering is off server thread
@@ -48,7 +48,7 @@ public class MapChunkCache114_1 extends AbstractMapChunkCache {
        private final long inhabitedTicks;

        private static final int BLOCKS_PER_SECTION = 16 * 16 * 16;
-       private static final int COLUMNS_PER_CHUNK = 16 * 16;
+       private static final int COLUMNS_PER_CHUNK = 32 * 32; //16 * 16;
        private static final byte[] emptyData = new byte[BLOCKS_PER_SECTION / 2];
        private static final byte[] fullData = new byte[BLOCKS_PER_SECTION / 2];

diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java
index b973db38..2d9de1e6 100644
--- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java
+++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java
@@ -38,6 +38,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {

     /** CraftChunkSnapshot */
     protected Class<?> craftchunksnapshot;
+    private Field ccss_biomestorage;
     private Field ccss_biome;
     /** CraftChunk */
     private Class<?> craftchunk;
@@ -47,6 +48,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
     private Method cw_gethandle;

     /** BiomeBase related helpers */
+    protected Class<?> biomestorage;
     protected Class<?> biomebase;
     protected Class<?> biomebasearray;
     protected Field biomebaselist;
@@ -130,8 +132,10 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
         cw_gethandle = getMethod(craftworld, new String[] { "getHandle" }, new Class[0]);
         /* CraftChunkSnapshot */
         craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot");
+        biomestorage = getNMSClass("net.minecraft.server.BiomeStorage");
+   ccss_biomestorage = getPrivateField(craftchunksnapshot, new String[] { "biome" }, biomestorage);
         biomebasearray =  getNMSClass("[Lnet.minecraft.server.BiomeBase;");
-        ccss_biome = getPrivateField(craftchunksnapshot, new String[] { "biome" }, biomebasearray);
+        ccss_biome = getPrivateField(biomestorage, new String[] { "f" }, biomebasearray);
         /* CraftChunk */
         craftchunk = getOBCClass("org.bukkit.craftbukkit.CraftChunk");
         cc_gethandle = getMethod(craftchunk, new String[] { "getHandle" }, new Class[0]);
@@ -223,6 +227,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
             }
         }
         if(!nofail) {
+            Log.severe("1. " + type);
             Log.severe("Unable to find field " + ids[0] + " for " + cls.getName());
             failed = true;
         } 
@@ -375,7 +380,8 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
     }

     public Object[] getBiomeBaseFromSnapshot(ChunkSnapshot css) {
-        return (Object[])getFieldValue(css, ccss_biome, null);
+        Object storage = getFieldValue(css, ccss_biomestorage, null);
+        return (Object[])getFieldValue(storage, ccss_biome, null);
     }
 //    public boolean isCraftChunkSnapshot(ChunkSnapshot css) {
 //        if(craftchunksnapshot != null) {
diff --git a/spigot/src/main/java/org/dynmap/bukkit/Helper.java b/spigot/src/main/java/org/dynmap/bukkit/Helper.java
index c785ba54..13e6ead8 100644
--- a/spigot/src/main/java/org/dynmap/bukkit/Helper.java
+++ b/spigot/src/main/java/org/dynmap/bukkit/Helper.java
@@ -35,8 +35,7 @@ public class Helper {
                 Log.info("Loading Glowstone support");
                 BukkitVersionHelper.helper = new BukkitVersionHelperGlowstone();
             }
-            else if (v.contains("(MC: 1.14.1)") || v.contains("(MC: 1.14.2)") ||
-                v.contains("(MC: 1.14.3)") ||  v.contains("(MC: 1.14.4)")) {
+            else if (v.contains("(MC: 1.15)")) {
                 BukkitVersionHelper.helper = new BukkitVersionHelperSpigot114_1();
             }
             else if (v.contains("(MC: 1.14)")) {

this is my temporary patch working server: http://mine.iruis.net/map

Tsoccerguy3 commented 4 years ago

Seems like minecraft supports multiple biomes on different y levels now. I've got a running version for 1.15, but it's definitely just a hack till there is proper 1.15 support available. I clearly had no Idea what I'm doing at some parts of the patch.. It uses hard-coded y=64 for getting the biome of a location. (Thrown away older forge support as my java version was too high to build them)

dynmap-1.15-experimental.zip

on boot it does not create a directory and commands just bring up the help on screen as if you enter a wrong command after the /dynmap

7:36:24 PM [warning] [dynmap] Task #5404 for dynmap v3.0-beta-6-Dev generated an exception 7:36:24 PM [javastacktrace] java.lang.NullPointerException: null 7:36:24 PM [javastacktrace] at org.dynmap.bukkit.DynmapPlugin$3$1.run(DynmapPlugin.java:1110) ~[?:?]

For it to work with Lucky Perms 5 you will need to pull https://github.com/webbukkit/dynmap/pull/2670 as well . It does work when i remove the lucky Perms plugin

Tilerphy commented 4 years ago

Mojang/Microsoft has released the deobfuscated source , get that and you will have the names functions and methods .

I really want to know how to get that deobfuscated source, even though @pk910 provided a great solution before. Does Mojang or MS publish the code in github or other where? It is so difficult to write plugins without the source code. Thank you man, please tell me the way.

Tsoccerguy3 commented 4 years ago

Mojang/Microsoft has released the deobfuscated source , get that and you will have the names functions and methods .

I really want to know how to get that deobfuscated source, even though @pk910 provided a great solution before. Does Mojang or MS publish the code in github or other where? It is so difficult to write plugins without the source code. Thank you man, please tell me the way.

https://github.com/Mojang , to start , you can also reach out to Nathan Adams https://twitter.com/dinnerbone?lang=da . https://www.minecraft.net/en-us/article/programmers-play-minecrafts-inner-workings Check here for links to other resourses https://help.minecraft.net/hc/en-us

averixus commented 4 years ago

Mojang/Microsoft has released the deobfuscated source , get that and you will have the names functions and methods .

No, they haven't. They've released a few specific libraries that are used in Minecraft, not the source of the entire game.

DefinePvP commented 4 years ago

You can find the deobfuscation mappings under .minecraft/versions/1.15/1.15.json under "client_mappings". It links to https://launcher.mojang.com/v1/objects/b52d82f713bfa18764b35f26d8fff5dc3d9476cd/client.txt

Blueeyestar commented 4 years ago

has mikeprimm already written a word about the 1.15?

lwd-adam commented 4 years ago

It's unfortunately not working correctly, yet. I've noticed some strange biome borders: http://mc.pk910.de/?worldname=world1&mapname=flat&zoom=4&x=172&y=64&z=99

I'd hit it.

pk910 commented 4 years ago

In 1.15 biome information is no longer stored as a 16x16 field array, it stores them in a 4x4x64 (x,z,y) cube... That really makes no sense in my eyes - especially as the 64 layers on the y axis hold the exact same data at the moment. image

The result out of this is that biome information is now only available per 4x4 (x,z) field, which is a visible quality loss on the map :/

For chunks that have not been loaded since 1.15 the old biome information is still stored, which is incompatible with the new format. I've added proper handling for both formats to my patch (https://github.com/webbukkit/dynmap/pull/2692/commits/168850f61e816522c5115ebe28c38df6d164ce56). That solves the strange biome borders I've mentioned before.

New version: dynmap-1.15-experimental2.zip (Again: This is not an official patch, it's just a hack and should be replaced when proper 1.15 support is built in)

Tsoccerguy3 commented 4 years ago

@pk910 could you merge this pull request into yours https://github.com/webbukkit/dynmap/pull/2670

mikeprimm commented 4 years ago

This all looks very promising! And I really appreciate the work on understanding the new biome format - I usually need to do the reverse engineering myself there :)

Blueeyestar commented 4 years ago

good to see you. I hope you can do it. Goofy that you have to invest so much time again and again with each new version .... this gives you gray hair ^^

progz commented 4 years ago

Hi everyone, I post this here because it's biome related

When I start the PaperMC 1.15 #8 This what I get :

[20:51:45 ERROR]: [dynmap] Unable to find field biome for org.bukkit.craftbukkit.v1_15_R1.CraftChunkSnapshot
[20:51:46 ERROR]: [org.bukkit.craftbukkit.v1_15_R1.CraftServer] Error initializing dynmap - bukkit version incompatible! initializing dynmap v3.0-beta-7-224 (Is it up to date?)
java.lang.IllegalArgumentException: Error initializing dynmap - bukkit version incompatible!
        at org.dynmap.bukkit.helper.BukkitVersionHelperGeneric.<init>(BukkitVersionHelperGeneric.java:159) ~[?:?]
        at org.dynmap.bukkit.helper.BukkitVersionHelperCB.<init>(BukkitVersionHelperCB.java:45) ~[?:?]
        at org.dynmap.bukkit.Helper.getHelper(Helper.java:55) ~[?:?]
        at org.dynmap.bukkit.DynmapPlugin.onLoad(DynmapPlugin.java:791) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:361) ~[patched_1.15.jar:git-Paper-8]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:226) ~[patched_1.15.jar:git-Paper-8]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:884) ~[patched_1.15.jar:git-Paper-8]
        at java.lang.Thread.run(Thread.java:835) [?:?]

FYI : I use http://dynmap.us/builds/dynmap/Dynmap-3.0-beta-7-spigot.jar build on the 14th december.

Thanks for your work

Blueeyestar commented 4 years ago

can you already estimate whether it will be a lot of work and how long days a week? I hope you don't have to put so much work back into it. It is annoying to rebuild all plugins with every new version. thank you for doing that for us

iruis commented 4 years ago

2696 fix water color (waterFogColor -> waterColor)

mikeprimm commented 4 years ago

Just finished a few hours of merging PRs and sorting out problems with them - new development builds are up, and appear to be running well on 1.15. Good amount of testing remaining, but definitely give the latest dev builds at https://dynmap.us/builds/dynmap/ a look. Specifically, only check the Dynmap-3.0-beta-7-*.jar builds

pk910 commented 4 years ago

Hmm, the deta-7 build does not handle the new biome data correctly. (you're actually just using the fist 256 numbers from the array as the old 16x16 matrix)

This way it generates strange biome borders (or call it a feature "chunk barcode" :D): image

To be fair: I've noted this bug only after releasing "the first try of 1.15 support" (experimental1), too. Everything seems to be working fine (with correct biome borders), but as soon as you trigger a chunk load (just fly along a biome border in creative mode) the biome data is replaced by the new format and dynmap generates the strange biome borders. image

I suggest using a sea biome border for testing. It's happening on other biome borders, too, but it's not as clearly visible as on sea biomes: image

MrKiller01 commented 4 years ago

Hi, I tried your latest Dynmap-3.0-beta-7-spigot.jar, but it generated a lot of noise and it did not work. I got this on our console....

[12:38:37] [Server thread/ERROR]: Error occurred while enabling dynmap v3.0-beta-7-236 (Is it up to date?) java.lang.NoClassDefFoundError: net/luckperms/api/LuckPerms at org.dynmap.bukkit.permissions.LuckPermsPermissions.create(LuckPermsPermissions.java:29) ~[?:?] at org.dynmap.bukkit.DynmapPlugin.onEnable(DynmapPlugin.java:865) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:456) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:266) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:783) [spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at java.lang.Thread.run(Unknown Source) [?:1.8.0_221] Caused by: java.lang.ClassNotFoundException: net.luckperms.api.LuckPerms at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_221] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:135) ~[spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:81) ~[spigot-1.15.jar:git-Spigot-047b6f8-61d4b09] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_221] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_221] ... 11 more

CraigParton commented 4 years ago

I did a bit of searching for info on the new biome format and found this. Not sure if anyone found that but this part in particular seemed a bit concerning:

The actual concrete biome on a block is calculated with an algorithm that interpolates between the existing data with a noise map in some way. Since 1.14 did not do that and instead saved the biome for every single block column, the biome borders change when a world is upgraded to 1.15 (see MC-160939).

If that's true, it seems like this noise generation algorithm will need to be reverse engineered to calculate the block by block biome data needed for smooth biome borders.

mikeprimm commented 4 years ago

Yep - I think you hit it on the head, there. I'm going to try detecting which format it is - should be easy enough since the length of the data is distinct (256 vs 1024). Lemme give that a go - if anyone locates the code for the interpolate, that'd be great: at worst, I'll just do a 2-d linear interpolate between them (which the water and grass tinting already do - just between adjacent blocks vs the center of 4x4 blocks)

mikeprimm commented 4 years ago

On the LuckPerms one - I just received that update, and didn't do further testing. It allegedly was for supporting a newer version of LuckPerms - might need to see what version you are using vs the version that that PR incorporated (v5.0). If using v5.0 is a problem, I might alter the code for the PR to include both the older version and the newer version.

mikeprimm commented 4 years ago

New builds up - give them a try as far as the 1.15 biome rendering

mikeprimm commented 4 years ago

Also, from what I can tell, the random biome stuff being discussed is likely a jitter on translation from the block coordinate to the actual 4x4x4 biome data: when rendering coordinate X, Y, Z, apply a noise function that generates a smooth offset from X, Y, Z, and then pick the biome corresponding to the 4x4x4 at that offset. So it's a noise field around the 4x4x4 grid of biome that effectively jitters the 'edges' of that uniform grid. The code for this appears to not to be in the server side (which makes sense, since this a purely rendering-side behavior), so supporting it will involve digging that up, and seeing if using the related noise functions are practical.

Blueeyestar commented 4 years ago

This is how it looks with the latest version. You can see it is getting slow :)

dynmap

mikeprimm commented 4 years ago

For what it's worth, here is the biome jittering code from the 1.15 client source: ` package net.minecraft.world.level.biome; import net.minecraft.util.LinearCongruentialGenerator; public enum FuzzyOffsetBiomeZoomer implements BiomeZoomer { INSTANCE;

   public Biome getBiome(long var1, int var3, int var4, int var5, BiomeManager.NoiseBiomeSource var6) {
      int var7 = var3 - 2;
      int var8 = var4 - 2;
      int var9 = var5 - 2;
      int var10 = var7 >> 2;
      int var11 = var8 >> 2;
      int var12 = var9 >> 2;
      double var13 = (double)(var7 & 3) / 4.0D;
      double var15 = (double)(var8 & 3) / 4.0D;
      double var17 = (double)(var9 & 3) / 4.0D;
      double[] var19 = new double[8];

      int var20;
      int var24;
      int var25;
      for(var20 = 0; var20 < 8; ++var20) {
         boolean var21 = (var20 & 4) == 0;
         boolean var22 = (var20 & 2) == 0;
         boolean var23 = (var20 & 1) == 0;
         var24 = var21 ? var10 : var10 + 1;
         var25 = var22 ? var11 : var11 + 1;
         int var26 = var23 ? var12 : var12 + 1;
         double var27 = var21 ? var13 : var13 - 1.0D;
         double var29 = var22 ? var15 : var15 - 1.0D;
         double var31 = var23 ? var17 : var17 - 1.0D;
         var19[var20] = getFiddledDistance(var1, var24, var25, var26, var27, var29, var31);
      }

      var20 = 0;
      double var33 = var19[0];

      int var34;
      for(var34 = 1; var34 < 8; ++var34) {
         if (var33 > var19[var34]) {
            var20 = var34;
            var33 = var19[var34];
         }
      }

      var34 = (var20 & 4) == 0 ? var10 : var10 + 1;
      var24 = (var20 & 2) == 0 ? var11 : var11 + 1;
      var25 = (var20 & 1) == 0 ? var12 : var12 + 1;
      return var6.getNoiseBiome(var34, var24, var25);
   }

   private static double getFiddledDistance(long var0, int var2, int var3, int var4, double var5, double var7, double var9) {
      long var11 = LinearCongruentialGenerator.next(var0, (long)var2);
      var11 = LinearCongruentialGenerator.next(var11, (long)var3);
      var11 = LinearCongruentialGenerator.next(var11, (long)var4);
      var11 = LinearCongruentialGenerator.next(var11, (long)var2);
      var11 = LinearCongruentialGenerator.next(var11, (long)var3);
      var11 = LinearCongruentialGenerator.next(var11, (long)var4);
      double var13 = getFiddle(var11);
      var11 = LinearCongruentialGenerator.next(var11, var0);
      double var15 = getFiddle(var11);
      var11 = LinearCongruentialGenerator.next(var11, var0);
      double var17 = getFiddle(var11);
      return sqr(var9 + var17) + sqr(var7 + var15) + sqr(var5 + var13);
   }

   private static double getFiddle(long var0) {
      double var2 = (double)((int)Math.floorMod(var0 >> 24, 1024L)) / 1024.0D;
      return (var2 - 0.5D) * 0.9D;
   }

   private static double sqr(double var0) {
      return var0 * var0;
   }
 }

`

mikeprimm commented 4 years ago

OK - modified the updated LuckPerms code to use the LuckPerms 5 API for the 5.x LuckPerms, while restoring the support for the LuckPerms 4 API for the older/existing mods. I don't have a viable LuckPerms configuration, so I'll need someone using LuckPerms with realistic settings to gauge if this helped with the previously reported issues. Check newest beta-7 builds. @MrKiller01

CraigParton commented 4 years ago

Thanks for the quick update on this!

mikeprimm commented 4 years ago

OK - just pushing support for the new 1.15 blocks - latest dev builds should have them in a few minutes (build 241 or later).

ttshivers commented 4 years ago

Where would I find these latest dev builds?

Blueeyestar commented 4 years ago

Where would I find these latest dev builds?

https://dynmap.us/builds/dynmap/Dynmap-3.0-beta-7-spigot.jar

Blueeyestar commented 4 years ago

OK - just pushing support for the new 1.15 blocks - latest dev builds should have them in a few minutes (build 241 or later).

I hope you can do it with the water with the different water biomes. Then the plugin would be usable again

mikeprimm commented 4 years ago

OK - just pushing support for the new 1.15 blocks - latest dev builds should have them in a few minutes (build 241 or later).

I hope you can do it with the water with the different water biomes. Then the plugin would be usable again

Not clear what you mean - what about the current state of the water shading makes it 'not usable'? If you're waiting for the noise field processing, you're gonna be waiting for a bit.... and you've got much higher level definition of 'usable' than most....

Blueeyestar commented 4 years ago

but is usable .. I'm also glad I think it's just a shame that they always screw so much on it that they get so much work. I am thankful for your work. it is the best plugin from spigot

mikeprimm commented 4 years ago

Just tagged and released 3.0-beta-7 to spigotmc and dev.bukkit.org, so folks should have official build available now. Pivoting dev build back to 3.0-SNAPSHOT.

Austinthemighty commented 4 years ago

Im currently running 1.15 on my server with 3.0-beta-7 and I'm getting some weird lighting bugs

screenshot of world flat

Screen Shot of world flat

screen shot of world surface

Screen Shot of world surface
mikeprimm commented 4 years ago

If the chunks were generated using anything other than vanilla client activity (e.g. WorldBorder fill), there is literally nothing I can do about the fact that they don't properly generate lighting data: in the absence of properly produced lighting data, all I have the option to do is a) assume full sky lighting (which will make under-water bright, but land look OK) or b) assume no sky lighting (which creates black patches. If it gets better after you fly a player via the client over the area and then rerender, then that is where we are.