[1.18.2 Fabric Bug] Frames staying consistent
itsdinkd opened this issue · 10 comments
Describe the bug
Destroying the Quarry underwater using Waterlogged markers does not break the frame. As the quarry runs, and if you destroy it, the markers stay in the world, which also cause entity lag. Please make it so if the quarry is destroyed all markers are destroyed as well.
Frames also stay using a non-waterlogged quarry. Frames should always be destroyed as again each one is its own entity and takes resources causing performance issues, especially on a server with numerous people who have set up quarries.
This is with only three people. that's the most spawned entity with 2.7k markers and one of the top 10 CPU hog. The markers for some reason stay with the frame
To Reproduce
Steps to reproduce the behavior:
- Setup quarry underwater
- Let it run
- Destroy quarry
- Frames do not become broken
Frame
As long as I know, quarry frames(the yellow one) will not be removed after the quarry removed. If you remove a frame, the frames connecting to the first one are automatically removed, then all frames are broken. But there is a exception in this rule, the frame next to fluid block(Water, Lava) will not be removed in this way. So, frames in water will not be removed automatically.
I know there is performance issue of rendering many frames, which is come from shape calculation. I'll fix this.
Marker
The marker(quarryplus:marker
, quarryplus:waterlogged_marker
) doesn't have any tick action in server world. It works only when you interact the marker(meaning right click the marker block), so I can't understand the performance issue of tick time. The marker is one of "Block Entity" and it doesn't spawn any "Entity". The screenshot of log shows the time of actions, I think. Does it contain client actions such as rendering?
The makers are removed after quarry is placed. Quarry must be placed after marker is setup(showing blue lines) and must be placed next to one of the markers.
My opinions
- It's intended that quarry frames are not broken after removing quarry.
- Too many frames cause performance issue(both in server and client) of calculating the shape
- Markers should be removed as soon as quarry is placed. I don't know why the markers stay after quarry works.
- What's the 3rd picture of logs showing? How to get it?
- What is the situation of 2nd picture?
Interesting.
As long as I know, quarry frames(the yellow one) will not be removed after the quarry removed. If you remove a frame, the frames connecting to the first one are automatically removed, then all frames are broken. But there is a exception in this rule, the frame next to fluid block(Water, Lava) will not be removed in this way. So, frames in water will not be removed automatically.
Right yes the one in the water did not break after breaking the frame.
Unfortunately it does not show client actions.
It's intended that quarry frames are not broken after removing quarry.
- Can you add a option in the config to remove frames after the quarry is no longer connected?
Too many frames cause performance issue(both in server and client) of calculating the shape
- Any chance on fixing this?
Markers should be removed as soon as quarry is placed. I don't know why the markers stay after quarry works.
- I'm not sure either, it's very strange.
What's the 3rd picture of logs showing? How to get it?
- Third picture is from the Carpet mod, running the command; `/tick entities`
What is the situation of 2nd picture?
- Situation in the second picture was showing that markers raised (I did a self test, I ran /tick entities prior to building that one, and only had the ocean frames up. Once I built the 2nd picture and ran the command, the marker entity count and CPU usage raised.
Can you add a option in the config to remove frames after the quarry is no longer connected?
Planning. Quarry will remove frames next to the machine when quarry is removed.
Shape issue
Working. I'll remove all calculation and use fixed shape for all connecting state.
Pictures
Thank you for answering. I'll investigate the performance more.
Turns out that was "minecraft:marker" not quarryplus:marker.
No freaking idea what the hell a Minecraft marker is, lmfao.
in relevance to frames staying consistent with your new workaround on config, enabling the new config that says frames shall be removed if quarry is broken, the frames do not get destroyed when breaking quarry.
I recorded video of the work.
https://youtu.be/caaP1c-8u9Q
Turns out that was "minecraft:marker" not quarryplus:marker.
No freaking idea what the hell a Minecraft marker is, lmfao.
There is an entity called "Marker" in vanilla, net.minecraft.world.entity.Marker
in official mapping, net.minecraft.entity.MarkerEntity
in yarn mapping.
The identifier is minecraft:marker
, but there is currently no use in vanilla code (nothing spawns the entity). It seems to be exist to save nbt data as entity. In code, there is nothing related to tick action, so the bottleneck should be in nbt serialize/desterilize, but how...?