Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Change typename
Browse files Browse the repository at this point in the history
  • Loading branch information
LNSSPsd committed Jun 4, 2022
1 parent ce30474 commit e57e9da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mirror/mapping_generator/item/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
//go:embed item_runtime_ids_2_1_10.json
var runtimeIDSData []byte

type ItemDescribe struct {
type ItemDesc struct {
ItemName string `json:"name"`
Meta int `json:"maxDamage"`
}

func main() {
itemsList := map[string]*ItemDescribe{}
itemsList := map[string]*ItemDesc{}
err := json.Unmarshal(runtimeIDSData, &itemsList)
if err != nil {
panic(err)
}
fmt.Println(len(itemsList))
runtimeIDToItemNameMapping := make(map[int32]*ItemDescribe)
runtimeIDToItemNameMapping := make(map[int32]*ItemDesc)
for iStr, item := range itemsList {
if i, err := strconv.Atoi(iStr); err != nil {
panic(err)
Expand Down

0 comments on commit e57e9da

Please sign in to comment.