File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,12 @@ public static void init(){
99
99
unitHideMinHealth = Core .settings .getInt ("unitDrawMinHealth" );
100
100
unitWeaponTargetLine = Core .settings .getBool ("unitWeaponTargetLine" );
101
101
unitItemCarried = Core .settings .getBool ("unitItemCarried" );
102
+
103
+ if (renderer .enableEffects && Time .nanosToMillis (DebugUtil .rendererTime ) > 200 ){
104
+ renderer .enableEffects = false ;
105
+ Core .settings .put ("effects" , false );
106
+ UIExt .announce ("[yellow]渲染耗时过长,自动关闭特效" );
107
+ }
102
108
});
103
109
Events .run (Trigger .draw , RenderExt ::draw );
104
110
Events .on (TileChangeEvent .class , RenderExt ::onSetBlock );
@@ -134,6 +140,7 @@ private static void draw(){
134
140
135
141
public static void onGroupDraw (Drawc t ){
136
142
if (!bulletShow && t instanceof Bulletc ) return ;
143
+ if (!renderer .enableEffects && t instanceof EffectState ) return ;
137
144
if (t instanceof Unitc u ) hide :{
138
145
if (u .isPlayer () && (u .isLocal () || unitHideExcludePlayers )) break hide ;
139
146
if (unitHide || u .maxHealth () + u .shield () < unitHideMinHealth ) return ;
You can’t perform that action at this time.
0 commit comments