File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
forge/src/main/java/org/embeddedt/modernfix/forge/packet Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 88import net .minecraftforge .fml .DistExecutor ;
99import org .embeddedt .modernfix .ModernFix ;
1010import org .embeddedt .modernfix .ModernFixClient ;
11+ import org .embeddedt .modernfix .core .ModernFixMixinPlugin ;
1112import org .embeddedt .modernfix .packet .EntityIDSyncPacket ;
1213
1314import java .util .function .Supplier ;
1415
1516public class PacketHandler {
1617 public static final SimpleChannel INSTANCE = buildChannel ("main" , "1" );
17- public static final SimpleChannel INGREDIENT_SYNC = buildChannel ("ingredient_sync" , "1" );
18+ public static final SimpleChannel INGREDIENT_SYNC ;
19+
20+ static {
21+ SimpleChannel ingredientChannel ;
22+ if (ModernFixMixinPlugin .instance .isOptionEnabled ("perf.smart_ingredient_sync.Channel" )) {
23+ ingredientChannel = buildChannel ("ingredient_sync" , "1" );
24+ } else {
25+ ingredientChannel = null ;
26+ }
27+ INGREDIENT_SYNC = ingredientChannel ;
28+ }
29+
1830 public static final ThreadLocal <Boolean > CLIENT_HAS_SMART_INGREDIENT_SYNC = ThreadLocal .withInitial (() -> false );
1931
2032 private static SimpleChannel buildChannel (String name , String version ) {
You can’t perform that action at this time.
0 commit comments