MCToolType
Link to mctooltype
A Tooltype is used to identify what kind of blocks a tool can mine, or inversely, what kind of tool is required to mine a given block.
This class was added by a mod with mod-id contenttweaker
. So you need to have this mod installed if you want to use this feature.
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
ZenScript Copymods.contenttweaker.item.MCToolType
Implemented Interfaces
Link to implemented-interfaces
MCToolType implements the following interfaces. That means any method available to them can also be used on this class.
Constructors
Link to constructors
Constructs a ToolType object. If one with the given name already exists, they will internally point to the same toolType. Otherwise, a new one with the name is created (The same holds true for Brackets as well!)
ZenScript Copynew mods.contenttweaker.item.MCToolType(name as String);
new mods.contenttweaker.item.MCToolType("pickaxe");
Parameter | Type | Description |
---|---|---|
Parameter name | Type String | Description The name to be used |
Methods
Link to methods
getName
Link to getname
Gets the name of this toolType. The name is what is used in the Bracket expression after the <tooltype:
Return type: String
ZenScript Copy<tooltype:pickaxe>.getName();
hashCode
Link to hashcode
Returns the object's hash code
Return type: int
ZenScript Copy<tooltype:pickaxe>.hashCode();
toString
Link to tostring
Get the string representation of this type. Is different from commandString!
Return type: String
ZenScript Copy<tooltype:pickaxe>.toString();
Properties
Link to properties
Nombre | Type | Has Getter | Has Setter |
---|---|---|---|
Nombre commandString | Type String | Has Getter true | Has Setter false |
Nombre name | Type String | Has Getter true | Has Setter false |
Operadores
Link to operadores
EQUALS
Link to equals
Compares if two given MCToolType objects are equal
ZenScript Copy<tooltype:pickaxe> == o as Object
<tooltype:pickaxe> == new MCToolType("pickaxe")
Parameter | Type | Description |
---|---|---|
Parameter o | Type Object | Description The other object |
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type String | Is Implicit false |