MineColonies

MineColonies

53M Downloads

NPE rendering near building with missing L5 schematic

uecasm opened this issue ยท 3 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.17.1
  • MineColonies Version: 1.0.70-ALPHA
  • Structurize Version: 0.13.253-ALPHA
  • Related Mods and their Versions:

Expected behavior

No crash.

Actual behavior

Crashes on trying to click the build tool on the ground near the warehouse.

Steps to reproduce the issue

  1. Have version 1.10 of the Frontier schematics installed
  2. Place a frontiermodded warehouse
  3. Build one of its courier_w buildings
  4. Click the build tool anywhere near the courier building

The immediate problem is that it's trying to preview this at level 5, but there's a typo in the schematics and courier_w5 does not exist (it's ccourier_w5 instead). However a missing schematic should not cause a crash, so it's still a code bug.

Logs

[20:14:03] [Render thread/INFO]: isCorrectMD5: md5:A5212B8E9C3922035225A16BACBEEFBF other:A5212B8E9C3922035225A16BACBEEFBF
[20:14:03] [Render thread/INFO]: [CHAT] Right-click the build tool on a solid block to adjust the build's position
[20:14:03] [Render thread/WARN]: File jar resolve FAILED for: schematics/frontiermodded/deliveryman5.blueprint
[21Oct2021 20:14:03.305] [Render thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "com.ldtteam.structurize.blueprints.v1.Blueprint.rotateWithMirror(net.minecraft.world.level.block.Rotation, net.minecraft.world.level.block.Mirror, net.minecraft.world.level.Level)" because "blueprint" is null
	Index: 4
	Listeners:
		0: NORMAL
		1: ASM: class com.ldtteam.blockui.mod.ClientEventSubscriber renderWorldLastEvent(Lnet/minecraftforge/client/event/RenderWorldLastEvent;)V
		2: ASM: class com.ldtteam.structurize.event.ClientEventSubscriber renderWorldLastEvent(Lnet/minecraftforge/client/event/RenderWorldLastEvent;)V
		3: LOWEST
		4: ASM: class com.minecolonies.coremod.event.ClientEventHandler renderWorldLastEvent(Lnet/minecraftforge/client/event/RenderWorldLastEvent;)V
		5: ASM: class nz.co.mirality.colony4cc.client.ClientRenderer renderWorldLastEvent(Lnet/minecraftforge/client/event/RenderWorldLastEvent;)V
java.lang.NullPointerException: Cannot invoke "com.ldtteam.structurize.blueprints.v1.Blueprint.rotateWithMirror(net.minecraft.world.level.block.Rotation, net.minecraft.world.level.block.Mirror, net.minecraft.world.level.Level)" because "blueprint" is null
	at TRANSFORMER/[email protected]/com.minecolonies.coremod.client.render.worldevent.NearColonyBuildingsRenderer.rebuildCache(NearColonyBuildingsRenderer.java:140)
	at TRANSFORMER/[email protected]/com.minecolonies.coremod.client.render.worldevent.NearColonyBuildingsRenderer.render(NearColonyBuildingsRenderer.java:69)
	at TRANSFORMER/[email protected]/com.minecolonies.coremod.client.render.worldevent.WorldEventContext.renderWorldLastEvent(WorldEventContext.java:60)
	at TRANSFORMER/[email protected]/com.minecolonies.coremod.event.ClientEventHandler.renderWorldLastEvent(ClientEventHandler.java:71)
	at net.minecraftforge.eventbus.ASMEventHandler_73_ClientEventHandler_renderWorldLastEvent_RenderWorldLastEvent.invoke(.dynamic)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
	at TRANSFORMER/[email protected]/net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(ForgeHooksClient.java:165)
	at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1052)
	at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:830)
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1039)
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659)
	at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:186)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90)

Notes


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

The missing schematic isn't missing per say, just misnamed. that will be resolved in the 1.11 update for frontier

commented

Actually, it looks like it doesn't matter about the courier_w5 vs ccourier_w5 thing, the problem is that the L5 render is looking for deliveryman5, not the actual schematic name that the hut was built with. I think that's related to @someaddons' multi-building changes?

commented

So there's actually two bugs here:

  1. It shouldn't be crashing if it can't find the L5 schematic
  2. It should be using the schematicName NBT to find the L5 schematic, not the hut registry name.

I think the latter is also affecting Repair on the hut too.

Note that the same thing also happens with Frontier's mineguard, although in that case instead of crashing it's rendering the guardtower5 schematic instead of the mineguard5 schematic (which is consistent with the crash).