Skip to content

Incorrect ItemId scope if node value is a block identifier #4

Open

Description

@respectZ

Take a sample:

var Attachable = &JsonHandler{
	Pattern: shared.AttachableGlob,
	Entries: []JsonEntry{
		{
			Store:      stores.ItemId.References,
			Path:       []shared.JsonPath{shared.JsonValue("minecraft:attachable/description/identifier")},
			FilterDiff: true,
			Source: func(ctx *JsonContext) []core.Symbol {
				return stores.ItemId.Source.Get()
			},
			References: func(ctx *JsonContext) []core.Symbol {
				return stores.ItemId.References.Get()
			},
		},
	},
}

The scope for store is defaultScope even the provided identifier was a block (item id).
Therefore, actions such as renaming block identifier from block definition won't update the attachable identifier, but works fine for the other way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions