Sculk removed off xp_step and triggered by player and mob death [Performance] #3545
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#3545
Loading…
Reference in New Issue
No description provided.
Delete Branch "sculk_performance_fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #3394
Testing
Kill mob near sculk catalyst - Don't drop xp, sculk expands
Kill mob far from sculk catalyst - Drop xp, sculk expands
Player death near sculk expands sculk
Player death not near sculk doesn't expand sculk
I dropped 10 zombies for an iron golem. He smashed them and they dropped XP (I know, it's a bug, but I'll exploit for testing purposes :)).
On master, mobs_step and xp take around 8.5% xp each. On the fix branch, mobs take 6% and xp, it's gone.
Main register method was taking 69%, afterwards, 78%.
This is ready for review.
WIP: Sculk removed off xp_step and triggered by player and mob death [Performance]to Sculk removed off xp_step and triggered by player and mob death [Performance]Oh, and just for reference, I profiled 0.82.0 in the same situation. 42.78 for main register method. 14% skulk, 22% kelp! This is 36% improvement next to ocean with 10 zombies worth of xp on the ground!
When the player dies XP is dropped and sculk is created.
In creative mode killing mobs also creates sculk and drops XP.
I don't think it is very important but this implementation is very different from Minecraft in that newly generated sculk does not need to touch existing sculk.
A little thought I just had while reading over this and the other skulk performance issue. Many minecraft mods exist to improve performance by combining many small xp orbs into one big orb. I know that this isn't a vanilla mechanic, but perhaps its worth a thought?
Thanks for testing this and raising these issues.
I have fixed the mobs issue dropping xp in creative.
The other two are a little more tricky and I am not sure of the best course of action. I wanted to get this into the next release which is likely soon (due to pending MT 5.7 release which is in feature freeze), and the performance impact is a big issue for most players.
I have created a new ticket and put it as an elevated priority.
MineClone2/MineClone2#3552
I would like to revisit those at a later date as performance issues for most is a bigger issue than a niche end game block that many won't play with for a while. I'm not even sure if I have seen it in game via mapgen yet so the impact could be very low.
It's fine expect for the player dropping XP and producing skulk. Another problem is that the amount of sculk the player produces is fixed. I think it should be based on the players actual experience count. If you did that and then had mcl_experience depend on mcl_sculk, mcl_sculks on_dieplayer will get run first so you can remove all the XP from the player if sculk is produced. When mcl_experience on_dieplayer runs, player will have no XP and no orbs will be dropped.
Or you can have mcl_experience trigger the creation of sculk directly which is probably a better option.
Fair points. I have added these into the ticket. I think you've got a strong grasp on player related stuff so that'll definitely help with the issue resolution.
Thanks for reviewing :). It's always appreciated.
518dd07781
toef633ce617