mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
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.
This commit is contained in:
parent
56b1170224
commit
a7d714f8ba
1 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@ import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
import com.simibubi.create.foundation.networking.AllPackets;
|
import com.simibubi.create.foundation.networking.AllPackets;
|
||||||
import com.simibubi.create.foundation.networking.LeftClickPacket;
|
import com.simibubi.create.foundation.networking.LeftClickPacket;
|
||||||
import com.simibubi.create.foundation.ponder.PonderTooltipHandler;
|
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.KineticRenderer;
|
||||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.render.backend.RenderWork;
|
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.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
||||||
import com.simibubi.create.foundation.utility.placement.PlacementHelpers;
|
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.Minecraft;
|
||||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -131,8 +134,8 @@ public class ClientEvents {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onLoadWorld(WorldEvent.Load event) {
|
public static void onLoadWorld(WorldEvent.Load event) {
|
||||||
IWorld world = event.getWorld();
|
IWorld world = event.getWorld();
|
||||||
if (world.isRemote() && world instanceof ClientWorld) {
|
if (world.isRemote() && world instanceof ClientWorld && !(world instanceof WrappedClientWorld)) {
|
||||||
CreateClient.invalidateRenderers();
|
CreateClient.invalidateRenderers(world);
|
||||||
AnimationTickHolder.reset();
|
AnimationTickHolder.reset();
|
||||||
KineticRenderer renderer = CreateClient.kineticRenderer.get(world);
|
KineticRenderer renderer = CreateClient.kineticRenderer.get(world);
|
||||||
renderer.invalidate();
|
renderer.invalidate();
|
||||||
|
|
Loading…
Reference in a new issue