Entity: add abstract getNetworkTypeId(), remove NETWORK_ID constant

this now requires that subclasses supply a proper NETWORK_ID.
This commit is contained in:
Dylan K. Taylor
2020-05-16 16:08:12 +01:00
parent 67666db827
commit c30dd9f1b6
21 changed files with 34 additions and 32 deletions

View File

@ -50,7 +50,7 @@ class EntityLandSound implements Sound{
LevelSoundEventPacket::SOUND_LAND,
$pos,
$this->blockLandedOn->getRuntimeId(),
$this->entity instanceof Player ? "minecraft:player" : LegacyEntityIdToStringIdMap::getInstance()->legacyToString($this->entity::NETWORK_ID) //TODO: bad hack, stuff depends on players having a -1 network ID :(
$this->entity instanceof Player ? "minecraft:player" : LegacyEntityIdToStringIdMap::getInstance()->legacyToString($this->entity::getNetworkTypeId()) //TODO: bad hack, stuff depends on players having a -1 network ID :(
//TODO: does isBaby have any relevance here?
);
}