21 lines
729 B
Java
21 lines
729 B
Java
package com.extendedae_plus.client;
|
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
import net.minecraftforge.client.event.ModelEvent;
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
/**
|
|
* 确保在模型烘焙/资源重载期间也会注册内置模型,避免在刷新资源后丢失内置模型映射。
|
|
*/
|
|
@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
|
|
public final class ClientModelEvents {
|
|
private ClientModelEvents() {}
|
|
|
|
@SubscribeEvent
|
|
public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
|
|
// 在每次模型重载开始时确保内置模型已注册
|
|
ClientProxy.init();
|
|
}
|
|
}
|