Post tag event directly from reloader thread (#6164)
This commit is contained in:
parent
71a4828809
commit
af8074cc39
3 changed files with 5 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
ItemTags.func_199902_a(this.field_199720_b);
|
||||
FluidTags.func_206953_a(this.field_205705_c);
|
||||
EntityTypeTags.func_219759_a(this.field_215299_d);
|
||||
+ net.minecraftforge.fml.DeferredWorkQueue.runLater(() -> net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this)));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent(this));
|
||||
}, p_215226_6_);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ForgeInternalHandler
|
|||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void tagsUpdated(TagsUpdatedEvent event)
|
||||
public synchronized void tagsUpdated(TagsUpdatedEvent event)
|
||||
{
|
||||
ForgeHooks.updateBurns();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@ import net.minecraftforge.eventbus.api.Event;
|
|||
/**
|
||||
* Fired on the client when {@link NetworkTagManager} has all of its tags synced from the server to the client (just after a client has connected).
|
||||
* Fired on the server when {@link NetworkTagManager} has read all tags from disk (during a data reload).
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}
|
||||
* On the client, this event fires on the Client Thread.
|
||||
* On the server, this event may be fired on the Server Thread, or an async reloader thread.
|
||||
*/
|
||||
public class TagsUpdatedEvent extends Event
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue