You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This registers them to spawn only on the configured biomes in the config. The default configuration looks like so:
"blackDogBiomeCategories": [
"plains"
],
Because of this the game will only call the canSpawn method of the black dog entity for locations within the plains biome.
The class BlackDogEntity inherits from BWHostileEntity which inherits from HostileEntity which inherits from HostileEntity.
The dog entity class overrides the canSpawn method as follows:
This code will be reached only if the getPathfindingFavor method returns 0.0f only. Even under these conditions, this does not impact the probability of spawning of a black dog. As the canSpawn method is only ever called in the plains biome by default, if the structure is in a different biome than the plains, it won't cause dogs to spawn nearby anyway.
The text was updated successfully, but these errors were encountered:
I have a possible implementation that would register all biomes for spawning and instead check the biome and location inside the canSpawn method only. If someone knows a better approach please let me know though. If not, I'll make a PR for this soon.
The spawn for the black dogs is defined like so:
This registers them to spawn only on the configured biomes in the config. The default configuration looks like so:
Because of this the game will only call the canSpawn method of the black dog entity for locations within the plains biome.
The class
BlackDogEntity
inherits fromBWHostileEntity
which inherits fromHostileEntity
which inherits fromHostileEntity
.The dog entity class overrides the
canSpawn
method as follows:This implementation first calls its super method whose implementation resides in
PathAwareEntity
and looks like so:The method
getPathfindingFavor
is overriden byHostileEntity
:Next, the following part is checked:
This is unnecessary as the cause of spawning will always be
SpawnReason.NATURAL
.So far this logic fullfils the logic of spawning the dogs in the dark in registered biomes. The next part however is the problem:
This code will be reached only if the
getPathfindingFavor
method returns 0.0f only. Even under these conditions, this does not impact the probability of spawning of a black dog. As thecanSpawn
method is only ever called in the plains biome by default, if the structure is in a different biome than the plains, it won't cause dogs to spawn nearby anyway.The text was updated successfully, but these errors were encountered: