Skip to content

Commit

Permalink
Merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 13, 2024
2 parents 3a15aaf + 3e18596 commit e15d0cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/blockhash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (b *hashBuilder) ftype(structName, s string, expr ast.Expr, directives map[
case "WoodType", "FlowerType", "DoubleFlowerType", "Colour":
// Assuming these were all based on metadata, it should be safe to assume a bit size of 4 for this.
return "uint64(" + s + ".Uint8())", 4
case "CoralType":
case "CoralType", "SkullType":
return "uint64(" + s + ".Uint8())", 3
case "AnvilType", "SandstoneType", "PrismarineType", "StoneBricksType", "NetherBricksType", "FroglightType", "WallConnectionType", "BlackstoneType", "DeepslateType", "TallGrassType":
return "uint64(" + s + ".Uint8())", 2
Expand Down
2 changes: 1 addition & 1 deletion server/block/hash.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions server/block/skull.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ func (s Skull) EncodeBlock() (string, map[string]interface{}) {

// allSkulls ...
func allSkulls() (skulls []world.Block) {
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{Attach: WallAttachment(f.Direction())})
for _, t := range SkullTypes() {
for _, d := range cube.Directions() {
skulls = append(skulls, Skull{Type: t, Attach: WallAttachment(d)})
}
skulls = append(skulls, Skull{Type: t, Attach: StandingAttachment(0)})
}
return append(skulls, Skull{Attach: StandingAttachment(0)})
return
}

0 comments on commit e15d0cf

Please sign in to comment.