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 Copyimport mods.mekanism.content.builder.RobitSkinBuilder;
Static Methods
Link to static-methods
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 CopyRobitSkinBuilder.builder(textures as MCResourceLocation[]) as RobitSkinBuilder
Parameter | Type | Description |
---|---|---|
Parameter textures | Type MCResourceLocation[] | Description Textures to use for the skin. |
Methods
Link to methods
Name: build
Create a robit skin from this builder with the given name.
Return Type: void
ZenScript CopyRobitSkinBuilder.build(name as string) as void
Parameter | Type | Description |
---|---|---|
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 CopyRobitSkinBuilder.customModel(model as MCResourceLocation) as RobitSkinBuilder
Parameter | Type | Description |
---|---|---|
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 CopyRobitSkinBuilder.unlockCheck(unlockedPredicate as Predicate<MCPlayerEntity>) as RobitSkinBuilder
Parameter | Type | Description |
---|---|---|
Parameter unlockedPredicate | Type Predicate<MCPlayerEntity> | Description Predicate that takes the player to check. |