Changes

22 bytes added ,  16:36, 13 August 2022
m
Line 102: Line 102:  
Forge expands the holderset codecs to allow additional json formats. Custom holderset serializers can be registered by creating a deferred register for ForgeRegistries.Keys.HOLDER_SET_TYPES, though the builtin types provided by forge should be sufficient for most use cases.
 
Forge expands the holderset codecs to allow additional json formats. Custom holderset serializers can be registered by creating a deferred register for ForgeRegistries.Keys.HOLDER_SET_TYPES, though the builtin types provided by forge should be sufficient for most use cases.
   −
==== Builtin Custom HolderSet Types ====
+
====Builtin Custom HolderSet Types====
 
+
Forge provides four builtin holderset types, allowing for additional set operations and representations in datapack registry jsons. The <code>and</code>, <code>or</code>,  
Forge provides four builtin holderset types, allowing for additional set operations and representations in datapack registry jsons. The and, or, and not types are composed of other holdersets, and are therefore potentially mutable as they may be composed of mutable tag holdersets whose values are recalculated after tags reload.
+
and <code>not</code> types are composed of other holdersets, and are therefore potentially mutable as they may be composed of mutable tag holdersets whose values are recalculated after tags reload.
 
+
=====Any=====
===== Any =====
  −
 
   
The <code>forge:any</code> holderset type represents the set of all elements of the relevant registry.
 
The <code>forge:any</code> holderset type represents the set of all elements of the relevant registry.
   Line 120: Line 118:       −
===== And =====
+
=====And=====
 
   
The <code>forge:and</code> type represents an intersection of other holdersets.
 
The <code>forge:and</code> type represents an intersection of other holdersets.
   Line 138: Line 135:  
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
=====Or=====
===== Or =====
  −
 
   
The <code>forge:or</code> type represents a union of other holdersets.
 
The <code>forge:or</code> type represents a union of other holdersets.
   Line 157: Line 152:  
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
=====Not=====
===== Not =====
  −
 
   
The <code>forge:not</code> type represents the set of all elements in the registry that do not belong to the specified holderset.
 
The <code>forge:not</code> type represents the set of all elements in the registry that do not belong to the specified holderset.