From a7d714f8ba7e04ef2345fc23147f7577a7d38b66 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Mar 2021 01:10:01 -0700 Subject: [PATCH] Fix for ponder particles yeeting Flywheel rendering. I need to isolate the world load/unload stuff for Flywheel anyway, a more robust solution is needed. --- src/main/java/com/simibubi/create/events/ClientEvents.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java index 5fc26c413..d17f2ab9d 100644 --- a/src/main/java/com/simibubi/create/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/events/ClientEvents.java @@ -28,6 +28,7 @@ import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.networking.LeftClickPacket; import com.simibubi.create.foundation.ponder.PonderTooltipHandler; +import com.simibubi.create.foundation.ponder.PonderWorld; import com.simibubi.create.foundation.render.KineticRenderer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.RenderWork; @@ -40,6 +41,8 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollVal import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ServerSpeedProvider; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; +import com.simibubi.create.foundation.utility.worldWrappers.WrappedClientWorld; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -131,8 +134,8 @@ public class ClientEvents { @SubscribeEvent public static void onLoadWorld(WorldEvent.Load event) { IWorld world = event.getWorld(); - if (world.isRemote() && world instanceof ClientWorld) { - CreateClient.invalidateRenderers(); + if (world.isRemote() && world instanceof ClientWorld && !(world instanceof WrappedClientWorld)) { + CreateClient.invalidateRenderers(world); AnimationTickHolder.reset(); KineticRenderer renderer = CreateClient.kineticRenderer.get(world); renderer.invalidate();