mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Fix ChunkDataEvent.Load
This commit is contained in:
@@ -410,9 +410,10 @@ public class EventHandlerImplCommon {
|
||||
@SubscribeEvent(priority = EventPriority.HIGH)
|
||||
public static void event(ChunkDataEvent.Load event) {
|
||||
LevelAccessor level = event.getChunk().getWorldForge();
|
||||
if (!(level instanceof ServerLevel)) {
|
||||
level = ((WorldEventAttachment) event).architectury$getAttachedLevel();
|
||||
}
|
||||
// TODO Fix when mixin is back
|
||||
// if (!(level instanceof ServerLevel)) {
|
||||
// level = ((WorldEventAttachment) event).architectury$getAttachedLevel();
|
||||
// }
|
||||
ChunkEvent.LOAD_DATA.invoker().load(event.getChunk(), level instanceof ServerLevel ? (ServerLevel) level : null, event.getData());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user