ModelPart ParentTypes - KitCat962/FiguraRewriteRewrite GitHub Wiki
ParentTypes are applied to ModelParts to apply specific transformations, or change how the ModelPart behaves.
To apply a ParentType through BlockBench, the group name must start with the ParentType. Only
groups can have ParentTypes applied via BlockBench.
For example, the ParentType "Head"
:
Head
and
HeadPhones
will have the ParentType "Head"
, but not
MagicHead
,
head
, or
Head
.
When setting the ParentType via group names, ParentTypes are commonly referred to as Keywords or BlockBench Keywords.
To apply a ParentType through script, index the ModelPart you want to set the ParentType of, then call the setParentType
method on it, passing in a ParentType as a string as the parameter.
models.Pet:setParentType("World")
After an avatar is loaded, there is no difference between groups,
cubes, or
bbmodels. Everything is a ModelPart, meaning everything can have a ParentType.
All ParentTypes have an alternate way of spelling it, an alias, though internally they do the same thing. They will be listed just underneath what Figura considers to be the true ParentType.
Many ParentTypes share similar properties. You can roughly put them into 3 distinct groups: Mimic, Pivot, and Special. These groupings are not recognized by the mod itself and just serve to make explaining similar ParentTypes more convenient.
Mimic: Mimic ParentTypes copy transformations (position, rotation, scale) from elsewhere, typically a Vanilla Part, and apply it to the ModelPart. This allows for a script-free way of making a ModelPart behave like a Vanilla Part. These transformations are added on top of any transformations set via script or transformations set via a BlockBench Animation. To prevent this ParentTypes transformations from being applied while a BlockBench Animation is playing, enable the Animation's Override property.
Pivot: Pivot ParentTypes move the location of specific Vanilla Parts to the pivot point of the ModelPart. If multiple of the same Pivot ParentType are in a bbmodel, multiple of them are rendered. These ParentTypes will only render their Vanilla Part if the part in the vanilla_model
global is visible.
Special: Special ParentTypes are ParentTypes that provide unique rendering functionality that is either difficult or impossible to recreate with script alone.
The default ParentType.
Using this ParentType as a Keyword has no purpose, as groups with no Keyword will have this ParentType, but it can still be used in scripts.
Mimic Type
Mimics the transformation offsets of the Vanilla HEAD
If there is no ModelParts with the Skull ParentType, ModelParts with this ParentType will replace the Vanilla Skull.
Mimic Type
Mimics the transformation offsets of the Vanilla BODY
Mimic Type
Mimics the transformation offsets of the Vanilla RIGHT_ARM
This ParentType will appear in First Person under the same conditions as the Vanilla RightArm.
Mimic Type
Mimics the transformation offsets of the Vanilla LEFT_ARM
This ParentType will appear in First Person under the same conditions as the Vanilla LeftArm.
Mimic Type
Mimics the transformation offsets of the Vanilla RIGHT_LEG
Mimic Type
Mimics the transformation offsets of the Vanilla LEFT_LEG
Mimic Type
Mimics the transformation offsets of the Vanilla RIGHT_ELYTRA
ModelParts with this ParentType are only visible while an Elytra is equipped.
Mimic Type
Mimics the transformation offsets of the Vanilla LEFT_ELYTRA
ModelParts with this ParentType are only visible while an Elytra is equipped.
Mimic Type
Mimics the transformation offsets of the Vanilla CAPE
This ParentType works even if you don't own a vanilla Cape.
Special Type
This ParentType will cause the ModelPart to be parented to the Minecraft World itself rather than your Player.
Position (0,0,0) will be at the world's origin. 1 block is 16 ModelPart units, so multiply the world coordinates by 16 before setting the position of a World ParentType ModelPart.
Rotation (0,0,0) will be facing South instead of what BlockBench defines as North.
ModelParts with this ParentType will be visible while in First Person.
Special Type
This ParentType causes the ModelPart to render on the Hud instead of on your player. This only affects the owner's Hud, or players that spectate the owner of the avatar.
(0,0,0) is the top left of the screen. 1 ModelPart unit is 1 Minecraft Gui unit. -X moves the ModelPart Right on the screen, and -Y moves the ModelPart Down on the screen. The Z axis determines which ModelParts render on top of others, with -Z moving the ModelPart closer. You can even have ModelParts render on top of the vanilla GUI.
Special Type
This ParentType causes the ModelPart to always face the camera. It behaves like the vanilla nameplate or particles.
Special Type
This ParentType causes the ModelPart to replace the Vanilla Skull.
Special Type
This ParentType will change the player icon in the TAB LIST.
Blockbench 0, 0, 0 is the bottom center and the valid area extends 4 units horizontally on each since and 8 units up.
Special Type
This ParentType replaces the model of arrows fired by you. The pivot point of the ModelPart that has this ParentType does not matter.
(0,0,0) in BlockBench is the point on the vanilla arrow's shaft that is just before the arrow head.
Special Type
This ParentType designates a Custom Item Model that can be used in the RENDER_ITEM event.
Pivot Type
This ParentType renders the right held item at the ModelPart's pivot point.
Pivot Type
This ParentType renders the left held item at the ModelPart's pivot point.
Pivot Type
This ParentType renders a spyglass at this ModelPart's pivot point when you are using a spyglass in the RightHand.
Pivot Type
This ParentType renders a spyglass at this ModelPart's pivot point when you are using a spyglass in the LeftHand.
Pivot Type
This ParentType renders the item that is currently in the Helmet slot. This is for stull like pumpkins, banners, bones. It will not render the Vanilla Helmet in a different location.
Pivot Type
This ParentType renders the entity riding on your right shoulder at the ModelPart's pivot point. I say entity, but that entity will always be a parrot.
Pivot Type
This ParentType renders the entity riding on your left shoulder at the ModelPart's pivot point. I say entity, but that entity will always be a parrot.