From 4d91ffd264c10ba82d767403e200347c74b8338d Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Mon, 18 Oct 2021 16:21:41 +0800 Subject: Cache sorted recipe list in NEI handlers --- src/main/java/gregtech/common/GT_Client.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/gregtech/common/GT_Client.java') diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 55efd20920..b9701bb451 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -152,6 +152,7 @@ public class GT_Client extends GT_Proxy private GT_ClientPreference mPreference; private boolean mFirstTick = false; public static final int ROTATION_MARKER_RESOLUTION = 120; + private int mReloadCount; public GT_Client() { mCapeRenderer = new GT_CapeRenderer(mCapeList); @@ -505,6 +506,12 @@ public class GT_Client extends GT_Proxy @SubscribeEvent public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) { mFirstTick = true; + mReloadCount++; + } + + @Override + public int getReloadCount() { + return mReloadCount; } @SubscribeEvent -- cgit