Skip to content

Commit

Permalink
session/entity_metadata.go: Always set EntityDataKeyHasNPC
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Nov 28, 2024
1 parent 11f0fe1 commit 2ff5143
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions server/session/entity_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (s *Session) parseEntityMetadata(e world.Entity) protocol.EntityMetadata {
m[protocol.EntityDataKeyEffectColor] = int32(0)
m[protocol.EntityDataKeyEffectAmbience] = byte(0)
m[protocol.EntityDataKeyColorIndex] = byte(0)
m[protocol.EntityDataKeyHasNPC] = uint8(1)

m.SetFlag(protocol.EntityDataKeyFlags, protocol.EntityDataFlagHasGravity)
m.SetFlag(protocol.EntityDataKeyFlags, protocol.EntityDataFlagClimb)
Expand Down Expand Up @@ -163,9 +164,6 @@ func (s *Session) addSpecificMetadata(e any, m protocol.EntityMetadata) {
}
m[protocol.EntityDataKeyVisibleMobEffects] = packedEffects
}
if d, ok := e.(dialogueProvider); ok {
m[protocol.EntityDataKeyHasNPC] = boolByte(d.CanShowDialogue())
}
if v, ok := e.(variable); ok {
m[protocol.EntityDataKeyVariant] = v.Variant()
}
Expand Down Expand Up @@ -282,7 +280,3 @@ type variable interface {
type markVariable interface {
MarkVariant() int32
}

type dialogueProvider interface {
CanShowDialogue() bool
}

0 comments on commit 2ff5143

Please sign in to comment.