feat: never remove projected person for far away

This commit is contained in:
xtex 2023-07-02 15:30:04 +08:00
parent 9251e5773b
commit f5bdaf34bc
Signed by: xtex
GPG Key ID: B918086ED8045B91

View File

@ -6,6 +6,7 @@ import dev.architectury.registry.level.entity.EntityAttributeRegistry
import net.fabricmc.api.EnvType
import net.minecraft.nbt.CompoundTag
import net.minecraft.network.chat.Component
import net.minecraft.network.protocol.game.DebugPackets
import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.EntityDataSerializers
import net.minecraft.network.syncher.SynchedEntityData
@ -136,4 +137,11 @@ class ProjectedPersonEntity(entityType: EntityType<out PathfinderMob>, level: Le
InventoryCarrier.pickUpItem(this, this, item)
}
override fun sendDebugPackets() {
super.sendDebugPackets()
DebugPackets.sendEntityBrain(this)
}
override fun removeWhenFarAway(d: Double) = false
}