Compare commits
2 Commits
9251e5773b
...
24080f0437
Author | SHA1 | Date | |
---|---|---|---|
24080f0437 | |||
f5bdaf34bc |
@ -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
|
||||
@ -94,11 +95,13 @@ class ProjectedPersonEntity(entityType: EntityType<out PathfinderMob>, level: Le
|
||||
override fun addAdditionalSaveData(tag: CompoundTag) {
|
||||
super.addAdditionalSaveData(tag)
|
||||
tag.put(KEY_ENTITY_SHAPE, shapeTag)
|
||||
writeInventoryToTag(tag)
|
||||
}
|
||||
|
||||
override fun readAdditionalSaveData(tag: CompoundTag) {
|
||||
super.readAdditionalSaveData(tag)
|
||||
shapeTag = tag.getCompound(KEY_ENTITY_SHAPE)
|
||||
readInventoryFromTag(tag)
|
||||
}
|
||||
|
||||
override fun shouldShowName() = true
|
||||
@ -136,4 +139,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
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user