@@ -171,7 +171,8 @@ public void onCameraTransformViewBobbing(
171171 public void onRender (MatrixStack matrixStack , float partialTicks )
172172 {
173173 MobEspStyleSetting .Shape shape = style .getShape ();
174- boolean drawShape = shape != MobEspStyleSetting .Shape .NONE ;
174+ boolean glowMode = shape == MobEspStyleSetting .Shape .GLOW ;
175+ boolean drawShape = !glowMode && shape != MobEspStyleSetting .Shape .NONE ;
175176 boolean drawLines = style .hasLines ();
176177 boolean drawFill = drawShape && fillShapes .isChecked ();
177178
@@ -211,31 +212,34 @@ public void onRender(MatrixStack matrixStack, float partialTicks)
211212 }
212213 }
213214
214- if (filledShapes != null && ! filledShapes . isEmpty () )
215+ if (! glowMode )
215216 {
216- switch ( shape )
217+ if ( filledShapes != null && ! filledShapes . isEmpty () )
217218 {
218- case BOX -> RenderUtils .drawSolidBoxes (matrixStack ,
219- filledShapes , false );
220- case OCTAHEDRON -> RenderUtils .drawSolidOctahedrons (matrixStack ,
221- filledShapes , false );
222- default ->
223- {
224- }
219+ switch (shape )
220+ {
221+ case BOX -> RenderUtils .drawSolidBoxes (matrixStack ,
222+ filledShapes , false );
223+ case OCTAHEDRON -> RenderUtils
224+ .drawSolidOctahedrons (matrixStack , filledShapes , false );
225+ default ->
226+ {
227+ }
228+ }
225229 }
226- }
227-
228- if (outlineShapes != null && !outlineShapes .isEmpty ())
229- {
230- switch (shape )
230+
231+ if (outlineShapes != null && !outlineShapes .isEmpty ())
231232 {
232- case BOX -> RenderUtils .drawOutlinedBoxes (matrixStack ,
233- outlineShapes , false );
234- case OCTAHEDRON -> RenderUtils
235- .drawOutlinedOctahedrons (matrixStack , outlineShapes , false );
236- default ->
237- {
238- }
233+ switch (shape )
234+ {
235+ case BOX -> RenderUtils .drawOutlinedBoxes (matrixStack ,
236+ outlineShapes , false );
237+ case OCTAHEDRON -> RenderUtils .drawOutlinedOctahedrons (
238+ matrixStack , outlineShapes , false );
239+ default ->
240+ {
241+ }
242+ }
239243 }
240244 }
241245
@@ -250,6 +254,17 @@ private float[] getColorRgb()
250254 return color .getColorF ();
251255 }
252256
257+ public boolean shouldGlow (LivingEntity entity )
258+ {
259+ return isEnabled () && style .getShape () == MobEspStyleSetting .Shape .GLOW
260+ && mobs .contains (entity );
261+ }
262+
263+ public int getGlowColor ()
264+ {
265+ return RenderUtils .toIntColor (getColorRgb (), 1F );
266+ }
267+
253268 private static final class MobEspStyleSetting
254269 extends EnumSetting <MobEspStyleSetting .Style >
255270 {
@@ -272,7 +287,8 @@ enum Shape
272287 {
273288 NONE ,
274289 BOX ,
275- OCTAHEDRON ;
290+ OCTAHEDRON ,
291+ GLOW ;
276292 }
277293
278294 private enum Style
@@ -282,7 +298,9 @@ private enum Style
282298 LINES ("Lines only" , Shape .NONE , true ),
283299 LINES_AND_BOXES ("Lines and boxes" , Shape .BOX , true ),
284300 LINES_AND_OCTAHEDRONS ("Lines and octahedrons" , Shape .OCTAHEDRON ,
285- true );
301+ true ),
302+ GLOW ("Glow only" , Shape .GLOW , false ),
303+ LINES_AND_GLOW ("Lines and glow" , Shape .GLOW , true );
286304
287305 private final String name ;
288306 private final Shape shape ;
0 commit comments