RobitSkinBuilder

Link to robitskinbuilder

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
Copy
import mods.mekanism.content.builder.RobitSkinBuilder;

Name: builder

Creates a builder for registering a custom RobitSkin. The textures should be located in the asset location: <namespace>/textures/entity/robit/<path>.png



It is important that this list has at least ONE element in it.



Every three ticks of the robit being alive if it has moved, the selected texture of this skin is incremented to the next one in the list, and then it repeats from
the start. This allows skins to define "movement" changes such as how the Robit's treads appear to be moving in the base skin.

Returns: A builder for creating a custom RobitSkin.
Return Type: RobitSkinBuilder

ZenScript
Copy
RobitSkinBuilder.builder(textures as MCResourceLocation[]) as RobitSkinBuilder
ParameterTypeDescription
Parameter
textures
Type
MCResourceLocation[]
Description
Textures to use for the skin.

Name: build

Create a robit skin from this builder with the given name.

Return Type: void

ZenScript
Copy
RobitSkinBuilder.build(name as string) as void
ParameterTypeDescription
Parameter
name
Type
string
Description
Registry name for the robit skin.

Name: customModel

Sets the location of the custom json model for this skin. In general, it is probably a good idea to base it off the existing robit model's json except with any small changes this skin requires. For an example of the syntax the default model's location would be mekanism:item/robit.

Return Type: RobitSkinBuilder

ZenScript
Copy
RobitSkinBuilder.customModel(model as MCResourceLocation) as RobitSkinBuilder
ParameterTypeDescription
Parameter
model
Type
MCResourceLocation
Description
Custom model.

Name: unlockCheck

Sets a predicate that can be used to check if a player has access to selecting this skin or not.

Return Type: RobitSkinBuilder

ZenScript
Copy
RobitSkinBuilder.unlockCheck(unlockedPredicate as Predicate<MCPlayerEntity>) as RobitSkinBuilder
ParameterTypeDescription
Parameter
unlockedPredicate
Type
Predicate<MCPlayerEntity>
Description
Predicate that takes the player to check.