Skip to content

Commit

Permalink
block/skull.go: Remove pointless conversion of cube.Face to cube.Dire…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
DaPigGuy committed Nov 12, 2024
1 parent bc8967b commit 3e18596
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/block/skull.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ func (s Skull) EncodeBlock() (string, map[string]interface{}) {
// allSkulls ...
func allSkulls() (skulls []world.Block) {
for _, t := range SkullTypes() {
for _, f := range cube.HorizontalFaces() {
// A direction of -2 and -1 isn't actually valid, but when encoding the block these are encoded as 0 and 1. We
// can't otherwise represent this properly in an Attachment type.
skulls = append(skulls, Skull{Type: t, Attach: WallAttachment(f.Direction())})
for _, d := range cube.Directions() {
skulls = append(skulls, Skull{Type: t, Attach: WallAttachment(d)})
}
skulls = append(skulls, Skull{Type: t, Attach: StandingAttachment(0)})
}
Expand Down

0 comments on commit 3e18596

Please sign in to comment.