Closed WaitingIdly closed 1 month ago
changes in this PR:
@Comp
type
value
valid
requirement
@Property
String
types
Property#requirement
Comp#unique
not
unique
int
Integer.MAX_VALUE
Comp.Type
some examples of what this looks like
-@Property(property = "input", valid = @Comp("1")) +@Property(property = "input", comp = @Comp(eq = 1)) -@Property(property = "input", valid = {@Comp(value = "4", type = Comp.Type.GTE), @Comp(value = "5", type = Comp.Type.LTE)}) +@Property(property = "input", comp = @Comp(gte = 4, lte = 5)) -@Property(valid = {@Comp(type = Comp.Type.GTE, value = "0"), @Comp(type = Comp.Type.LTE, value = "1")}) +@Property(comp = @Comp(gte = 0, lte = 1)) -@Property(value = "groovyscript.wiki.craftingrecipe.ingredientMatrix.value", requirement = "groovyscript.wiki.craftingrecipe.matrix.required", valid = {@Comp(value = "1", type = Comp.Type.GTE), @Comp(value = "9", type = Comp.Type.LTE)}, priority = 200, hierarchy = 20) +@Property(value = "groovyscript.wiki.craftingrecipe.ingredientMatrix.value", comp = @Comp(gte = 1, lte = 9, unique = "groovyscript.wiki.craftingrecipe.matrix.required"), priority = 200, hierarchy = 20)
changes in this PR:
@Comp
annotation works with the goal of making it easier to write.type
andvalue
elements of@Comp
, and deprecates thevalid
andrequirement
elements of@Property
.@Comp
annotations, you now have a single@Comp
annotation with multiple elements.String
value
element.type
element, there is atypes
element.types
element can be omitted.types
is not required for any@Comp
in our current codebase.Property#requirement
,Comp#unique
is used.not
andunique
elements are aString
, the other elements areint
.Integer.MAX_VALUE
in a@Comp
, as its redundant in it being anint
type.value
elements that are now migrated to beunique
elements.Comp.Type
enum declare the lang key in full.some examples of what this looks like