forked from SteamWar/SteamWar
Do not hide entities with the BauSystem hullhider
HullHider gets a hideEntities parameter: the fight still hides entities inside hidden hulls, /hullhider only hides blocks. As the TechHider also dropped spawn packets at hidden positions, ForPlayer#canAccessEntitySpawn decides about them now, which the BauTechHider always allows.
This commit is contained in:
@@ -52,6 +52,13 @@ public interface AccessPrivilegeProvider {
|
||||
|
||||
boolean canAccessEntity(int entityId);
|
||||
|
||||
/**
|
||||
* @return whether the player may see the entity spawning at this position
|
||||
*/
|
||||
default boolean canAccessEntitySpawn(int entityId, int blockX, int blockY, int blockZ) {
|
||||
return canAccessEntity(entityId) && canAccessPosition(blockX, blockY, blockZ);
|
||||
}
|
||||
|
||||
boolean canAccessBlockEntity(int blockX, int blockY, int blockZ, BlockEntityType<?> type);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user