Merge Adapter | Banner - WolfyScript/CustomCrafting GitHub Wiki
Key: customcrafting:banner
Version: v4.16.5+
Properties
replacePattern:Replaces the patterns of the result item when enabled; otherwise appends it to the patterns of the result.
default:falseinsertAtIndex:Specifies where to insert the target patterns into the result patterns.
default:after last pagepatterns:Specifies the pattern data that should be included. Either by index or value.
default:[]value:Checks if the value is in the targets' patterns and adds it.
default:nullindex:Adds the pattern at the specified index and adds it.
default:nullcondition:A custom boolean operation to check if the value should be included.
default:true
extra:Additional Patterns that are always added to the result.
default:[]addExtraFirst:When enabled, adds the extra patterns before copying the patterns; otherwise afterwards.
default:false
Examples
Take a specific pattern from an item and add it to the result:
{
key: "customcrafting:banner",
patterns: [
{
value: {
type: TRIANGLE_TOP,
dyeColor: LIME
}
}
]
}
Get the first pattern from the target and add it to the result:
{
key: "customcrafting:banner",
patterns: [
{
index: 0 // Note: if the index is bigger/smaller than the amount of patterns, then it wraps around.
// Tip: negative indexes start from the end of the pattern list.
}
]
}
Add all target patterns to the result:
{
key: "customcrafting:banner",
patterns: [
{ } // Condition is true by default, and matches each pattern
]
}
Take the first and last target pattern and add it to the beginning
{
key: "customcrafting:banner",
insertAtIndex: 0,
patterns: [
{
index: 0
},
{
index: -1
}
]
}