From 1.21.3/1.21.4 version, items are defined by a type and a set of components that depend on the type of the item
For example a firework rocket with flight_duration=3. It's data string will be
minecraft:firework_rocket[minecraft:fireworks={flight_duration:3b}]
The yellow part is the type and the blue one are the components
You can see the "data string" of an object with the command /redistrade inspect with the item you want to inspect on the main hand
Config Section
config.yml
blacklistedItemRegexes:-regex:'.*flight_duration: 3b.*'containsOnly:false-regex:'flight_duration: 3b'containsOnly:true-regex:'diamond_sword'#To ban all diamond swords from tradescontainsOnly:true
containsOnly -> If on true, the string inside regex will be checked with contains() instead of the regex pattern. This is much more efficient than checking a regex
regex -> You can create a regex to match the item data string. If matched, the item will be denied from being put inside the trade GUI. To create your regex you can use https://regex101.com/
Recommendations : use less regex possible (containsOnly: false) and if you have many regexes,
put the simpler regexes at the beginning so they get matched before the complex ones, because checks are all made on the main thread.
Simple regexes typically take half a millisecond while contains checks require microseconds