Changes

2 bytes removed ,  15:59, 7 March 2021
m
make the comment correct in code block
Line 7: Line 7:  
* You may declare a <code><nowiki>remove</nowiki></code> array of the same format as the <code><nowiki>values</nowiki></code> array. Any values listed here will be removed from the tag. This acts as a finer grained version of the Vanilla <code><nowiki>replace</nowiki></code> option.
 
* You may declare a <code><nowiki>remove</nowiki></code> array of the same format as the <code><nowiki>values</nowiki></code> array. Any values listed here will be removed from the tag. This acts as a finer grained version of the Vanilla <code><nowiki>replace</nowiki></code> option.
   −
== Using Tags In Code ==
+
==Using Tags In Code==
 
Block, Item, and Fluid tags are automatically sent from the server to any remote clients on login and reload. Function tags are not synced.
 
Block, Item, and Fluid tags are automatically sent from the server to any remote clients on login and reload. Function tags are not synced.
   Line 17: Line 17:  
Item unknownItem = stack.getItem();
 
Item unknownItem = stack.getItem();
 
boolean isInGroup = ItemTags.getCollection().getOrCreateTag(myTagId).contains(unknownItem);
 
boolean isInGroup = ItemTags.getCollection().getOrCreateTag(myTagId).contains(unknownItem);
'' alternatively, can use getTag and perform a null check
+
// alternatively, can use getTag and perform a null check
 
</syntaxhighlight>
 
</syntaxhighlight>