MWall541 / Dragon-Mounts-Legacy

Github Repository for the Dragon Mounts: Legacy Minecraft Mod. Please Report any issues here!
GNU General Public License v3.0
38 stars 36 forks source link

Dragon Breeds Issues, Visual & Crash #230

Closed annu220 closed 6 months ago

annu220 commented 6 months ago

Version - DML 1.2.0-BETA for Minecraft 1.18.2

Logs: For the privacy of the friend having the crash, they requested not to have the log uploaded. What caused the crash was this section here. If I can ever replicate the crash, I will upload my own log in full.

[13:59:08] [Render thread/ERROR]: Unreported exception thrown! java.lang.NullPointerException: Cannot invoke "com.github.kay9.dragonmounts.dragon.breed.DragonBreed.immunities()" because "this.breed" is null at com.github.kay9.dragonmounts.dragon.TameableDragon.m5825(TameableDragon.java:1137) ~[dragonmounts-1.18.2-1.2.0-beta.jar%23125!/:1.18.2-1.2.0-beta] at net.minecraft.world.entity.Entity.m6060(Entity.java:1949) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.entity.EntityRenderer.m6086(EntityRenderer.java:43) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.entity.EntityRenderer.m114505(EntityRenderer.java:35) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.entity.EntityRenderDispatcher.m114394(EntityRenderDispatcher.java:70) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.LevelRenderer.m109517(LevelRenderer.java:1428) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.LevelRenderer.m109599(LevelRenderer.java:1219) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.GameRenderer.m109089(GameRenderer.java:1061) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.renderer.GameRenderer.m109093(GameRenderer.java:835) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.Minecraft.m91383(Minecraft.java:1046) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.Minecraft.m91374(Minecraft.java:665) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%23278!/:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?] at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.2.18.jar%2330!/:?] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2312!/:?] at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]

This seems to be related to an issue with dragons seemingly "Swapping" breeds when loaded and unloaded

Steps to Reproduce:

Breed Bug

  1. Spawn in a dragon. (Noticed an issue with spawn eggs not working, had to be done through commands)
  2. Tame dragon and have it sit.
  3. Fly/Teleport away from the dragon.
  4. Fly/Teleport back
  5. Dragon is strangely another breed

Crash

  1. Spawn in a dragon. (Noticed an issue with spawn eggs not working, had to be done through commands)
  2. Tame dragon and have it sit.
  3. Fly into chunks that have not loaded yet on the dragon
  4. When chunks load and causes dragon to reload, game crashes.

Description of issue: Dragon breeds seem to not be being assigned right, and are randomly switching when rerendered. Additonally, flying into unloaded chunks with a dragon and causing a reload/rerender of the dragon can cause a crash. Dragon Breed swapping tested on Singleplayer and Server Crash tested only on the Server.

MWall541 commented 6 months ago

Hi!

I just pushed out 1.2.1 for Minecraft 1.18.2 which should hopefully address the issues here. I apologize for the inconvenience.