You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func init() {
var m []creativeItemEntry
if err := nbt.Unmarshal(creativeItemData, &m); err != nil {
panic(err)
}
+ var genericSliceThatShouldntGetMoreAttentionThanItNeeds []any+ if err := nbt.Unmarshal(creativeItemData, &genericSliceThatShouldntGetMoreAttentionThanItNeeds); err != nil {+ panic(err)+ }+ for i, data := range m {- for _, data := range m {
if n, ok := it.(world.NBTer); ok {
if len(data.NBT) > 0 {
it = n.DecodeNBT(data.NBT).(world.Item)
}
}
st := item.NewStack(it, 1)
+ if _, ok := it.(item.EnchantedBook); ok {+ fmt.Printf("%v: %#v\n", i, genericSliceThatShouldntGetMoreAttentionThanItNeeds[i])+ }
if len(data.NBT) > 0 {
var invalid bool
Will result in:
1452: map[string]interface {}{"meta":0, "name":"minecraft:enchanted_book", "nbt":map[string]interface {}{}}
...
(For the sake of simplicity, I cut all the in between since its all the same anyway...)
...
1561: map[string]interface {}{"meta":0, "name":"minecraft:enchanted_book", "nbt":map[string]interface {}{}}
Clearly there was intended to be nbt there, but it never got assigned(?)
The text was updated successfully, but these errors were encountered:
Research
What the user sees
What debugging will do
In
server/item/creative.go
:Will result in:
Clearly there was intended to be nbt there, but it never got assigned(?)
The text was updated successfully, but these errors were encountered: