Robit
Link to robit
This class was added by a mod with mod-id mekanism
. 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 at the very top of the file.
ZenScript Copyimport mods.mekanism.api.entity.robit.Robit;
You can obtain a Robit by using the is
keyword with a LivingEntity object and then casting it.
Methods
Link to methods
Name: getSkin
Gets the skin this Robit currently is using.
Returns: Current skin.
Return Type: RobitSkin
ZenScript Copy// Robit.getSkin() as RobitSkin
myRobit.getSkin();
Name: setSkin
Tries to set this Robit's skin to the given skin.
Returns: true
if the Robit's skin was set, or false if the player does not have security clearance
or doesn't have the skin unlocked.
Return Type: boolean
ZenScript CopyRobit.setSkin(skin as RobitSkin, player as MCPlayerEntity?) as boolean
Parameter | Type | Description |
---|---|---|
Parameter skin | Type RobitSkin | Description The skin to set. |
Parameter player | Type MCPlayerEntity? | Description The player who is trying to set the skin of the robit, or null if the player is unknown. |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name skin | Type RobitSkin | Has Getter true | Has Setter false | Description Gets the skin this Robit currently is using. |