Add the files I forget adding

This commit is contained in:
Tnze
2021-02-18 21:36:27 +08:00
parent ea0e0d1cae
commit 178c34eacb
4 changed files with 1182 additions and 6 deletions

View File

@ -1,5 +1,4 @@
//+build ignore
//go:generate go run $GOFILE
// gen_soundIDs.go generates the enumeration of sound IDs.
package main
@ -21,6 +20,7 @@ type sound struct {
Name string
}
//go:generate go run $GOFILE
func main() {
sounds, err := downloadSoundInfo()
if err != nil {
@ -28,7 +28,7 @@ func main() {
os.Exit(1)
}
f, err := os.Create("soundIDs.go")
f, err := os.Create("soundid.go")
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
@ -37,11 +37,9 @@ func main() {
fmt.Fprintln(f, "// Code generated by gen_soundIDs.go. DO NOT EDIT.")
fmt.Fprintln(f)
fmt.Fprintln(f, "package data")
fmt.Fprintln(f, "package soundid")
fmt.Fprintln(f)
fmt.Fprintln(f, "//go:generate go run gen_soundIDs.go")
fmt.Fprintln(f)
fmt.Fprintln(f, "// SoundID represents a sound ID used in the minecraft protocol.")
fmt.Fprintln(f, "type SoundID int32")
fmt.Fprintln(f)

1008
data/soundid/soundid.go Normal file

File diff suppressed because it is too large Load Diff