Brazier

Brazier

3M Downloads

missing texture in latest version

Wedge1453 opened this issue ยท 21 comments

commented

2021-04-02_19 01 34
also, as you can see in the pic, there's an iceloger spawned by InControl custom spawn rules, so I guess it doesn't work with that...

commented

I can't seem to recreate it reliably.
Sometimes when I play I get it myself, but very very rarely and I have no idea when and when not.

The JEI error is something entirely else, but I should be fixed next version.

If it accures to you again, can you send me the entire log file please

commented

Hello,

I just discovered this issue myself and I believe I can share some insight as to what is causing this problem and why it appears to be intermittent.

A recent development in Forge is the parallelization of certain stages of mod loading. Information on that available here.

I noticed that, in your mod, the registration of the TextureStitchEvent event listener takes place in Brazier.clientSetup() here, which itself is registered during the FMLClientSetupEvent received by BrazierForge.doClientStuff() method here. The implicit assumption in this arrangement is that the TextureStitchEvent family will be fired after FMLClientSetupEvent, but this is not always the case.

This can be illustrated by the following minimal test case:

@EventBusSubscriber(bus = Bus.MOD)
public class TestEvents {

	@SubscribeEvent
	public static void onTextureStitch(TextureStitchEvent.Pre event) {
		LogManager.getLogger().info(">>>>>>>>>>>>>>> Texture Stitch Event Fired!");
	}
	
	@SubscribeEvent
	public static void onFMLClientSetup(FMLClientSetupEvent event) {
		LogManager.getLogger().info("***************** Client Setup Event Fired!");
	}
	
}

You will observe that the events fire in a different order occasionally. This "texture missing" bug will occur if the FMLClientSetupEvent is invoked anywhere after the TextureStitchEvent. Even if the TextureStitchEvent listener is eventually successfully registered during FMLClientSetupEvent, it will have "missed" the initial event because it was registered too late.

Reloading the resource pack with the in game F3+T (and therefore, re-firing the TextureStitchEvent) will clear up the issue once it has occurred.

The "simple" solution would be subscribe to the TextureStitchEvent somewhere apart from the FMLClientSetupEvent since their order of execution is not guaranteed to be in the order that this mod expects, but I am unsure how you would prefer to fit this into your existing design.

commented

Thank you very much, that does make a lot of sense and should easily be solved

commented

Should be fixed in the next version

commented

fabric or forge?

commented

ok guess it's forge, looks like atmospheric biomes in the background

commented

yep forge, also in case you haven't noticed, there's some text under the image

commented

how does the mod work? does it trick minecraft nto thinking that the area has a light level above 7 so no mobs can spawn? I need to know so that I can make it work with InControl spawn rules

commented

Nope, I just cancels the MobSpawnEvent.
Maybe you can add a SpawnType like "NATURAL" or "SPAWNER"

commented

sadly there isn't such option in InControl

commented

Can you send me the log file, I am unable to recreate the missing texture bug

commented

And are you using the potentialspawn or the spawner system of in control?

commented

recently I switched to spawner because potentialspawn doesn't work properly and is frustrating, I don't remember testing the brazier when I used to use potentialspawn.
I deleted the profile where I had the texture bug, I will try recreate the bug and send you the log soon.

commented

Weird, when I tried it using the spawner system it worked

commented

I've gotten a similar issue, so I can pass my log over. The game was still open when I put the log here and I haven't touched any configs.

latest.log

Brazier

commented

can you send my a list of the mods or a pack download?

commented
commented

The texture issues seems unrelated to other mods, I could reproduce it with Force 36.1.0, Architectury 1.12.145, Cloth Config v4 API 4.11.19, and Brazier 3.0.4; not other mods needed.

Hope this helps!

commented

I am unable to reproduce it with the mods/versions you listed, but I get the same bug in a pack with more mods

commented

Ok, weirdly enough not anymore, I have uploaded a new build with an updated architectury version, hopefully that fixes it

commented

I just tested the fix, and I have good news and bad news.

Good news: the fix works, for the minimum working set of mods (Forge, Architectury, Cloth Config, and Brazier).

The bad news, there is an issue with the Just Enough Items integration, the texture goes back to being broken the moment JEI is present:

2021-05-02_11 20 23

I discovered this after doing a binary search through my active mods. Looking in the logs, I found an interesting interaction between Brazier and JEI:

[02May2021 11:15:49.899] [Render thread/ERROR] [mezz.jei.load.PluginCaller/]: Caught an error from mod plugin: class com.possible_triangle.brazier.forge.compat.jei.JeiPlugin brazier:plugin
java.lang.IllegalArgumentException: ingredients must not be empty.
	at mezz.jei.util.ErrorUtil.checkNotEmpty(ErrorUtil.java:214) ~[jei:7.6.4.90]
	at mezz.jei.ingredients.IngredientManager.removeIngredientsAtRuntime(IngredientManager.java:223) ~[jei:7.6.4.90]
	at mezz.jei.ingredients.IngredientManager.removeIngredientsAtRuntime(IngredientManager.java:191) ~[jei:7.6.4.90]
	at com.possible_triangle.brazier.forge.compat.jei.JeiPlugin.onRuntimeAvailable(JeiPlugin.java:56) ~[brazier:?]
	at mezz.jei.startup.JeiStarter.lambda$start$1(JeiStarter.java:99) ~[jei:7.6.4.90]
	at mezz.jei.load.PluginCaller.callOnPlugins(PluginCaller.java:26) ~[jei:7.6.4.90]
	at mezz.jei.startup.JeiStarter.start(JeiStarter.java:99) ~[jei:7.6.4.90]
	at mezz.jei.startup.ClientLifecycleHandler.startJEI(ClientLifecycleHandler.java:141) ~[jei:7.6.4.90]
	at mezz.jei.startup.ClientLifecycleHandler.setupJEI(ClientLifecycleHandler.java:134) ~[jei:7.6.4.90]
	at mezz.jei.startup.ClientLifecycleHandler.lambda$new$2(ClientLifecycleHandler.java:100) ~[jei:7.6.4.90]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(ForgeHooksClient.java:706) ~[forge:?]
	at net.minecraft.client.network.play.ClientPlayNetHandler.func_199525_a(ClientPlayNetHandler.java:1314) ~[?:?]
	at net.minecraft.network.play.server.SUpdateRecipesPacket.func_148833_a(SourceFile:27) ~[?:?]
	at net.minecraft.network.play.server.SUpdateRecipesPacket.func_148833_a(SourceFile:15) ~[?:?]
	at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?]
	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?]
	at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:947) ~[?:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) ~[?:?]
	at net.minecraft.client.main.Main.main(Main.java:184) ~[1.16.5-forge-36.1.0.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.1.0.jar:36.1]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?]

Seems the JEI integration in Brazier errors out -- I am not well-versed enough in Forge modding to explain how this would lead to broken a texture, so I hope this helps you out!

(Exact versions, for clarity:

  • Minecraft 1.16.5,
  • Forge 36.1.0,
  • Architectury 1.12.145,
  • Cloth Config v4 API 4.11.19,
  • Brazier 3.0.5,
  • JEI 7.6.4.90

Let me know if I can do anything else to debug this!)