Meldexun / EntityCulling

Minecraft Mod: Skip rendering of hidden entities.
26 stars 2 forks source link

Mob Grinding Utils area boxes are culled prematurely #40

Closed embeddedt closed 2 years ago

embeddedt commented 2 years ago

Describe the bug

Entity Culling does not take the area-of-effect box from Mob Grinding Utils blocks into account, leading to them being culled unnecessarily. Perhaps all blocks from the mod should just be blacklisted?

To Reproduce Steps to reproduce the behavior:

  1. Place a fan from Mob Grinding Utils facing upwards.
  2. Open the fan's GUI.
  3. Click 'Show Area'.
  4. Close the GUI.
  5. Look upwards.
  6. Observe that the fan disappears.

Expected behavior

The box should be visible even if the fan block isn't. This works without Entity Culling installed.

Screenshots

screenshot_5

Versions Entity Culling: 4.2.1 Forge: 14.23.5.2855 Minecraft: 1.12.2

Other Crash report (upload as a file): N/A Latest log (upload as a file): N/A Singleplayer/Multiplayer: Singleplayer Other mods (that are necessary to produce the bug): Mob Grinding Utils Other mods (that are also installed): Many - this is part of a modpack. OptiFine is not installed. FoamFix and LoliASM are installed.

Let me know if you need additional information; as a fellow developer myself, I understand your frustration with vague bug reports.

embeddedt commented 2 years ago

Update: I've found that adding mob_grinding_utils to tileEntityCachedBoundingBoxBlacklist in the config fixes the issue; this should likely be the default as the block changes its bounding box depending on whether the option is enabled or not.

Is there possibly an efficient trick the mod could use to invalidate its cache automatically when a tile entity is updated? Perhaps every time a GUI is opened or closed? I suspect this will affect any machine-like mod with area-of-effect boxes as well.

Meldexun commented 2 years ago

In v1.12.2-4.2.3 cached bounding boxes are updated every 100 frames which should fix this issue.