mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-25 14:36:18 +01:00
Listen carefully
- Actually have MeshTree listen to ecrr event - Fixes bug where cows explode after a resource reload
This commit is contained in:
parent
f5a6e5af0c
commit
9e4f55b72a
2 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ import dev.engine_room.flywheel.impl.visualization.VisualizationEventHandler;
|
|||
import dev.engine_room.flywheel.lib.model.ModelCache;
|
||||
import dev.engine_room.flywheel.lib.model.ModelHolder;
|
||||
import dev.engine_room.flywheel.lib.model.baked.PartialModelEventHandler;
|
||||
import dev.engine_room.flywheel.lib.model.part.MeshTree;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientEntityEvents;
|
||||
|
@ -73,6 +74,7 @@ public final class FlywheelFabric implements ClientModInitializer {
|
|||
ModelCache.onEndClientResourceReload());
|
||||
EndClientResourceReloadCallback.EVENT.register((minecraft, resourceManager, initialReload, error) ->
|
||||
ModelHolder.onEndClientResourceReload());
|
||||
EndClientResourceReloadCallback.EVENT.register((minecraft, resourceManager, initialReload, error) -> MeshTree.onEndClientResourceReload());
|
||||
|
||||
ModelLoadingPlugin.register(ctx -> {
|
||||
ctx.addModels(PartialModelEventHandler.onRegisterAdditional());
|
||||
|
|
|
@ -14,6 +14,7 @@ import dev.engine_room.flywheel.impl.visualization.VisualizationEventHandler;
|
|||
import dev.engine_room.flywheel.lib.model.ModelCache;
|
||||
import dev.engine_room.flywheel.lib.model.ModelHolder;
|
||||
import dev.engine_room.flywheel.lib.model.baked.PartialModelEventHandler;
|
||||
import dev.engine_room.flywheel.lib.model.part.MeshTree;
|
||||
import dev.engine_room.flywheel.lib.util.LevelAttached;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.commands.synchronization.ArgumentTypeInfos;
|
||||
|
@ -112,6 +113,7 @@ public final class FlywheelForge {
|
|||
|
||||
modEventBus.addListener((EndClientResourceReloadEvent e) -> ModelCache.onEndClientResourceReload());
|
||||
modEventBus.addListener((EndClientResourceReloadEvent e) -> ModelHolder.onEndClientResourceReload());
|
||||
modEventBus.addListener((EndClientResourceReloadEvent e) -> MeshTree.onEndClientResourceReload());
|
||||
|
||||
modEventBus.addListener(PartialModelEventHandler::onRegisterAdditional);
|
||||
modEventBus.addListener(PartialModelEventHandler::onBakingCompleted);
|
||||
|
|
Loading…
Reference in a new issue