Record Class ZenTypeInfo
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.zencode.ZenTypeInfo
- Record Components:
targetName- The fully qualified name of the class as it should be exposed to ZenCode, if attempting to register a class; otherwise the fully qualified name of the ZenCode type that should be expanded, if attempting to register an expansion.kind- The kind of type that should be exposed to ZenCode.
Holds information relative to a specific type that still needs to be registered to ZenCode.
This record is used as a holder to store all information that CraftTweaker requires to properly create and
register a type to the ZenCode environment. The registered types will then be accessible through the
IZenClassRegistry.
- Since:
- 9.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicates the kind of type that should be exposed to ZenCode. -
Constructor Summary
ConstructorsConstructorDescriptionZenTypeInfo(String targetName, ZenTypeInfo.TypeKind kind) Creates an instance of aZenTypeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ZenTypeInfofrom(NativeTypeInfo nativeInfo) Converts aNativeTypeInfointo aZenTypeInfofor ZenCode registration.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.Returns the value of thetargetNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ZenTypeInfo
Creates an instance of aZenTypeInforecord class.- Parameters:
targetName- the value for thetargetNamerecord componentkind- the value for thekindrecord component
-
-
Method Details
-
from
Converts aNativeTypeInfointo aZenTypeInfofor ZenCode registration.- Parameters:
nativeInfo- The native type info to convert.- Returns:
- A
ZenTypeInfowhich can be used to expose the given native type to ZenCode. - Since:
- 9.1.0
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
targetName
Returns the value of thetargetNamerecord component.- Returns:
- the value of the
targetNamerecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-