Skip to content

Commit

Permalink
air-only flag
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jun 22, 2024
1 parent 8bfd732 commit 728c698
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.22.4

require github.com/klauspost/compress v1.16.0

require github.com/minetest-go/types v1.0.2
require github.com/minetest-go/types v1.0.4
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw
github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/minetest-go/types v1.0.2 h1:lHU9frnlgtWO3XFIVxO5X3Gi+y07gV+guREglqnwDJM=
github.com/minetest-go/types v1.0.2/go.mod h1:QS2q8tKAiuBe2Rin880ARFt9VokYIJNZV4Z4kHAChU0=
github.com/minetest-go/types v1.0.4 h1:SuM1UPXM2ocngJqZwlxZjnQVJEFxeMyk4bqlEw1BAj4=
github.com/minetest-go/types v1.0.4/go.mod h1:QS2q8tKAiuBe2Rin880ARFt9VokYIJNZV4Z4kHAChU0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
Expand Down
5 changes: 5 additions & 0 deletions parse_block_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ func parseBlockMapping(data []byte, offset *int, mapblock *types.MapBlock) {
*offset += nameLen

mapblock.BlockMapping[nodeId] = blockName

if numMappings == 1 && blockName == "air" {
// mark as air-only
mapblock.AirOnly = true
}
}
}
}

0 comments on commit 728c698

Please sign in to comment.