webbukkit / DynmapBlockScan

Tool to scan post-1.8 MC blocks and JSON model data to automatically generate Dynmap models
61 stars 30 forks source link

Port to Fabric, Minecraft 1.19.1/1.19.2 #74

Closed AJahueyM closed 1 year ago

AJahueyM commented 1 year ago

I recently added Dynmap to a modded server Im running with some friends and noticed that BlockScan is Forge only. I decided to port it. This is my first exprience with Minecraft modding so if there is any better way to impement certain features please let me know!

AJahueyM commented 1 year ago

image

Dynmap showing some blocks from "Blockus", which is Fabric only.

CCF100 commented 1 year ago

You are a legend

L1Z3 commented 1 year ago

omg thank you

L1Z3 commented 1 year ago

Hey, tried compiling this and using it on my server, but I get a crash:

[24.04 09:16:09] [Server] [Server thread/ERROR]: Encountered an unexpected exception
[24.04 09:16:09] [Server] java.lang.NoClassDefFoundErrornet/minecraft/world/BlockView
[24.04 09:16:09] [Server]   at org.dynmapblockscan.fabric_1_19_1.Proxy.startServer(Proxy.java:14) ~[DynmapBlockScan-fabric-1.19.1-1.0.0-dev.jar:?]
[24.04 09:16:09] [Server]   at org.dynmapblockscan.fabric_1_19_1.DynmapBlockScanMod.onServerStarting(DynmapBlockScanMod.java:83) ~[DynmapBlockScan-fabric-1.19.1-1.0.0-dev.jar:?]
[24.04 09:16:09] [Server]   at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$0(ServerLifecycleEvents.java:38) ~[fabric-lifecycle-events-v1-2.2.4+1b46dc7890-db0fd3f5dc0d6099.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.handler$dai000$fabric-lifecycle-events-v1$beforeSetupServer(MinecraftServer.java:7796) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:636) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at java.lang.Thread.run(Thread.java:833) [?:?]
[24.04 09:16:09] [Server] Caused byjava.lang.ClassNotFoundException: net.minecraft.world.BlockView
[24.04 09:16:09] [Server]   at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
[24.04 09:16:09] [Server]   at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
[24.04 09:16:09] [Server]   at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) ~[fabric-loader-0.14.18.jar:?]
[24.04 09:16:09] [Server]   at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.18.jar:?]
[24.04 09:16:09] [Server]   at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
[24.04 09:16:09] [Server]   ... more
[24.04 09:16:09] [Server] [Server thread/ERROR]: This crash report has been saved to: /./crash-reports/crash-2023-04-24_09.16.09-server.txt
[24.04 09:16:09] [Server] [Server thread/INFO]: [BisectHosting] Cleaning up scheduled tasks.
[24.04 09:16:09] [Server] [Server thread/ERROR]: Exception stopping the server
[24.04 09:16:09] [Server] java.lang.NullPointerExceptionCannot invoke "org.dynmap.MapManager.getWorlds()" because "this.core.mapManager" is null
[24.04 09:16:09] [Server]   at org.dynmap.fabric_1_19_1.DynmapPlugin.saveWorlds(DynmapPlugin.java:739) ~[Dynmap-3.4-fabric-1.19.1.jar:?]
[24.04 09:16:09] [Server]   at org.dynmap.fabric_1_19_1.DynmapPlugin.onDisable(DynmapPlugin.java:511) ~[Dynmap-3.4-fabric-1.19.1.jar:?]
[24.04 09:16:09] [Server]   at org.dynmap.fabric_1_19_1.DynmapPlugin.serverStop(DynmapPlugin.java:252) ~[Dynmap-3.4-fabric-1.19.1.jar:?]
[24.04 09:16:09] [Server]   at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$4(ServerLifecycleEvents.java:63) ~[fabric-lifecycle-events-v1-2.2.4+1b46dc7890-db0fd3f5dc0d6099.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.handler$dai000$fabric-lifecycle-events-v1$beforeShutdownServer(MinecraftServer.java:7806) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.method_3782(MinecraftServer.java) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.class_3176.method_3782(class_3176.java:547) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[server-intermediary.jar:?]
[24.04 09:16:09] [Server]   at java.lang.Thread.run(Thread.java:833) [?:?]

Any ideas?

L1Z3 commented 1 year ago

Sorry, disregard this--I used the wrong jar! (I needed to run the jar target followed by remapJar in fabric-1.19.1/build.gradle and then use that target jar, not whatever I was using before.)

Thanks so much for your work on this port!!

Jolain commented 1 year ago

Absolute legend. I have issues with a few mods not rendering correctly but otherwise works great, thank you so much.

Jolain commented 1 year ago

image

Mostly working on AQM2 1.19.2 with , notably Oh The Biomes You'll Go does not export properly.

AJahueyM commented 1 year ago

During the summer I may try to fix these issues

mikeprimm commented 1 year ago

Excellent! I'll give this a look, and we can see about extending on your work!