Refactor entity name retrieval to use this.entity for off-owning-thread access#377
Refactor entity name retrieval to use this.entity for off-owning-thread access#377NonSwag wants to merge 1 commit intoPaperMC:ver/1.21.6from
this.entity for off-owning-thread access#377Conversation
|
Doesn't (Yes I know this is really old Im very sorry, I was looking at this code earlier and remembered this PR and wanted to throw in my thought) |
|
I think I checked all places where these methods are called but I can't really remember anymore. |
|
It's not abt where the methods in the API are called, it's that it's accessing a system internally that isn't thread safe and is used for a lot of different states, so making it unguarded isn't the best idea bc then if people start accessing the internal synched entity data off the region context then it can cause crashes easily that make no sense(Ive seen a few before) |
|
So yea probably should be closed maybe Sorry man, I remembered this PR and wanted to throw my thought in |
This allows to get an entity's (team) name without having to switch thread context