Farmer's Delight

Farmer's Delight

95M Downloads

[1.21] CME in ItemProperties registration

lcy0x1 opened this issue · 1 comments

commented

Minecraft version

1.21.1

Farmer's Delight version

1.2.4

NeoForge version

21.1.4

Description

https://github.com/vectorwing/FarmersDelight/blob/1.21/src/main/java/vectorwing/farmersdelight/client/event/ClientSetupEvents.java#L32

I believe ItemProperty registration is not thread safe and needs to be enqueued using event.enqueueWork(()->{…});

Steps to reproduce

Happens at random during client startup.

Mod list

Modlist should not be relevant for this issue.

Logs

	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1229)
	at TRANSFORMER/[email protected]/net.minecraft.client.renderer.item.ItemProperties.register(ItemProperties.java:61)
	at TRANSFORMER/[email protected]/vectorwing.farmersdelight.client.event.ClientSetupEvents.init(ClientSetupEvents.java:32)```

### Minimal instance

- [X] I have tested this on a minimal instance

### Performance and shader mods

- [X] I am using performance or shader mods
commented

Fixed on commit 4eea661. Thanks for pointing it out! 👍