RelativityMC / VMP-fabric

A Fabric mod designed to improve server performance at high playercounts.
MIT License
136 stars 8 forks source link

if the same entity kills a player/bot(emulating a player perfectly) multiple times there is a chance for it to become completely invisible and un-interactable for players (but other entities can still seemingly can still interact and kill it) #68

Closed JamesBaker381 closed 6 days ago

JamesBaker381 commented 1 week ago

if the same entity kills a player/bot(emulating a player perfectly) multiple times there is a chance for it to become completely invisible and un-interactable for players (but other entities can still seemingly can still interact and kill it)

To Reproduce load up a fabric server without any mods other than "vmp-fabric-mc1.21-0.2.0+beta.7.162-all.jar" fly to large clearing and set the world spawn in the middle (for easier mob targeting) run /gamerule spawnRadius 10 to set the spawn radius to 10 to make it clearer get a new player/bot to join (you can use offline mode if you dont have another account) run the command:

summon zombie ~ ~ ~ {CanBreakDoors:1,CustomName:'[{"text":"Big Greg","bold":true}]',CustomNameVisible:1b,Health:50,FallFlying:1b,PersistenceRequired:1b,active_effects:[{id:strength,duration:1000000000000000000,amplifier:2,show_particles:0b}],HandItems:[{id:netherite_sword,count:1}],HandDropChances:[1f],ArmorItems:[{id:netherite_boots,count:1},{id:netherite_leggings,count:1},{id:netherite_chestplate,count:1},{id:netherite_helmet,count:1}],ArmorDropChances:[0.99f,1f,1f,1f],attributes:[{id:"generic.follow_range",base:2048f},{id:"generic.attack_knockback",base:1f},{id:"generic.max_health",base:50f}]}

inside of a command block (make sure you have command blocks enabled in server.properties) as it is too long to run in chat and then run /tick rate 200 to set the server tickrate to 100 (to make player killing a little faster but still not to fast to miss the error) finally run /gamerule doImmediateRespawn true to ensure the player respawns immediately

Expected behavior after a short while of the player getting killed you should see the player model dosent respawn but you will see the zombie targeting and killing the invisible player and will also get the message in chat however you will not be able to directly interact with this other invisible player after a kill the player will probably revert back to normal but if you freeze the game with /tick freeze and kill the zombie while the other player is invisible before the zombie gets to it then you will see the player stays invisible and while the environment can interact with it for example you can kill the player with lava if you do /tp @s "otherPlayerName" and place lava at that block but you cannot hit the player.

Screenshots 2024-07-04_15 14 43 (after teleporting, flying two blocks up and looking down) 2024-07-04_15 14 48 (after placing lava)

Runtime info (please complete the following information):

Crash reports / logs console remains empty

Other mods tested without any other mods not even fabric api

Checklist

JamesBaker381 commented 1 week ago

update: reconnecting to the server fixes the bug temporarily

ishland commented 1 week ago

Does it happen without VMP?

JamesBaker381 commented 1 week ago

nope it was first noticed when I was playing on a server with a couple optimisation mods so I did a binary search and narrowed it down to just VMP

ishland commented 1 week ago

Try reproduce with optimized_entity_tracking_use_staging_area disabled.

JamesBaker381 commented 1 week ago

it seems to fix the issue at least I wasnt able to reproduce afterwards

JamesBaker381 commented 1 week ago

btw does this mod provide any performance benefit when theres only one or two players?

ishland commented 6 days ago

btw does this mod provide any performance benefit when theres only one or two players?

It will provide some benefits in most entity-heavy scenarios.