MarkusBordihn / BOs-Adaptive-Performance-Tweaks

Adaptive Performance Tweaks is a collection of Minecraft Forge server-side Mod which automatically adjust specific settings on the server to allow a more balanced TPS/FPS.
Other
4 stars 2 forks source link

Items are removed even when there are no items in the world (removed by the command) #47

Closed BlackAures1 closed 11 months ago

BlackAures1 commented 1 year ago

image

Items are removed even when there are no items in the world. This was in version 1.18 and I was hoping it was fixed in 1.19, but this bug still haunts the mod and is very annoying. We play in the local network (LAN) and at first everything is fine, but when you play more than 10 hours any blocks just stop dropping items. Even after clearing the world of items with a command and even after disabling deletion in the configs. After removing the Item Optimization mod, this problem disappears.

MarkusBordihn commented 1 year ago

Thanks for the report, but unfortunately I'm not able to reproduce the issue on my own server, which is already running since 8 days, see: image

Could you please perform the following steps to reproduce the issue:

  1. Log into the game and make sure that items still not dropping
  2. Run /aptweaks debug core true and /aptweaks debug items true as op
  3. Try to drop items or break blocks
  4. Run /aptweaks debug core false and /aptweaks debug items false as op
  5. Exit the game
  6. Share the debug.log

The debug.log should show why items are removed or if they are clustered at a specific position.

In general the mod only removes the oldest items and just from the same type of item. Which means even if you have a lot of dirt somewhere laying around other items types will not be affected by them.

It's possible that you are using other mods which modifying the core files and cause incompatible issues, but without getting the whole mod list and the debug.log I'm unable to take a closer look. Thanks.

BlackAures1 commented 1 year ago

Alas, I can't devote that much time to this, given that this problem occurs spontaneously after a while, but many users of my modpack complained about this on version 1.18. I deleted that mod of yours that deals with the items and the problem did not appear again. Now testing my next major modpack for 1.19.2 and everything was fine for a long time, but alas, this problem appeared again because of your mod.

This is not the first time I've encountered this problem with your mod on different versions, and I need to solve other modpack problems now, rather than catching that bug for a long time. We have already finished testing and I do not have the opportunity to check it for you.

Keep in mind that the local server works a little differently and many bugs that occur on the local server may not exist on the dedicated server. I have encountered this distinction in my own mod and in many others, but not all developers separate the two types of servers.

Let my report hang for a while, maybe someone will add information to this issue.

BlackAures1 commented 1 year ago

The only detail I can add is that the problem occurs when the player is out of range of the host. When I tried to destroy the same blocks near the host, they would give me items, but as soon as I got very far away, the items would stop dropping.

MarkusBordihn commented 1 year ago

Thanks for the feedback. I will leave this issue report open for the next days, but without an corresponding debug.log I will not be able to reproduce the issue and able to fix any potential issue from my side.

Please keep in mind that there are some technical statements which are not fully correct.

But anyways I will review the corresponding code part, but without a corresponding debug.log it would be like looking for a needle in a haystack.

BlackAures1 commented 1 year ago

Oh man how many times have I heard "there is no difference between dedicated server and LAN" and as many times have I encountered that I have to check everything separately in single game, LAN and dedicated server because there is a difference. Yes, technically there is no difference, but for the user and bug report it is a huge difference. It would be silly to deny the existence of a problem if it's reproduced in the local network, but not reproduced in a singleplayer and a dedicated server (I'm not talking about this particular case, but about the situation in general).

Didn't anyone else report a similar problem? This problem is at least eight months old. If you need a log and an old debug file from me, here you go: debug.log latest.log

Your debug mode was not enabled here, but at least there is some information here. There is a lot of unnecessary garbage and duplication of the same line, but I have not yet reached the point of cleaning logs in the creation of modpack. On 1.19.2 got a port not all useful mods and have to spend a lot of time looking for alternatives.

MarkusBordihn commented 1 year ago

Let me clarify some parts, I never denied that there could be problems with LAN servers which are not happening on dedicated servers. As stated in https://docs.minecraftforge.net/en/latest/concepts/sides/ most of the issues on LAN servers happen because of Reaching Across Logical Sides. Which mean the client thread and server thread could access and modify the same static definitions, which is not happening on a pure dedicated server because they are isolated and have only a server thread. I run into these issues myself from time to time when I forget to check for the logical side after I re-use code or testing stuff.

That's the reason why you need to use Level#isClientSide for server operation's to avoid exactly this kind of problem. In this specific case this mod is a pure server side mod, which mean it's ignoring the client side complete like: https://github.com/MarkusBordihn/BOs-Adaptive-Performance-Tweaks/blob/4360057d3a29f8b3beaf61796a5082dcc4d8d923/items/src/main/java/de/markusbordihn/adaptiveperformancetweaksitems/entity/ItemEntityManager.java#LL157C1-L161C6

For this reason I could exclude from the technical side that it's related to LAN server vs dedicated server and it's related to something else, which I could not reproduce on my side.

Furthermore this is the first user report about "stop dropping items" even if exactly this kind of mod is used outside of CurseForge more than all of my mods combined or visible on the CurseForge download counter.

I allow "distribution outside of CurseForge" for all my mods and the difference you are seeing in the following overview shows that exactly this mod is used 15 x times more often outside of CurseForge.

image

At the moment I assume a mod compatibility issue with other mods in your mod-pack. For this reason I will not be able to help without a corresponding debug.log , with the steps from https://github.com/MarkusBordihn/BOs-Adaptive-Performance-Tweaks/issues/47#issuecomment-1565082048 to see whats really happen in this specific case, behind the scenes. A good example is: https://github.com/MarkusBordihn/BOs-Adaptive-Performance-Tweaks/issues/46 which allows me to fast reproduce the issue and working on a fix.

I'm happy to leave this issue report open so see if there are any other reports with similar issues.

BlackAures1 commented 1 year ago

Alas, I'm not very good at programming and am more of an artist than a coder, but I understand what you mean. Thank you for taking so much time to respond in detail. I really appreciate it. In my experience, if there have been no bug reports for such a noticeable problem all this time, it really could be a problem with my modpack specifically. This is important information.

The example of the needle in the haystack is a great example and very clear. I am not insane to ask for such things to be fixed.

The first modpack I made is already public. My second modpack is still in progress and I'll finish it soon (I've been doing it from morning till night for a month already). When I have done, we'll do the final testing and I'll do the debug you ask for :3

FirDragon commented 1 year ago

I can confirm that it has happened on the server side as well, but the probability is very low. At the same time, it will also cause the creature to feign death.

FirDragon commented 1 year ago

The creature has 0 health and is down, but not destroyed. Has a hitbox but cannot be knocked back, and can be pushed by pistons. In addition, there are creatures stuck with full blood, which can't move in place all the time, invincible after being attacked once, and being attacked will not produce a knockback effect. It can appear at a certain rate when a large number of mobs repeatedly spawn and die. The solution that has been found by accident so far is to use a mechanically powered manipulator to poke the creature in suspended animation, which has a chance to make it disappear.

MarkusBordihn commented 1 year ago

@FirDragon That's an interesting issue. The spawn module is only "blocking" the spawn of mobs, but not the de-spawning or is killing any mobs. Which mean that technical I see no relations to this mod, but happy to try to reproduce the issue.

Is this always the same kind of creature from a specific mod or is this an random mob ? I had similar issues in the past, but these issue were related to render optimization mod with curly entities.

MarkusBordihn commented 1 year ago

@FirDragon I added some additional checks in the latest version for 1.19.4 - 1.20.1 and instead of just "canceling" the spawn event I additional cancelnd the spawn and mob itself as well.

Maybe this will resolve the issue with the not de-spawning, because they should be removed from the world with this additional check.

If this is still not working, I could implement a check which removes all mobs with 0 hp, but for this I would get some additional details.