-
Notifications
You must be signed in to change notification settings - Fork 8
Add a render to an entity
We are going to see how to add a simple render of your CraftStudio model to an entity.
You'll need to create a simple entity, we aren't going to see the complete process here, to gain time, but you can find good tuturial online.
Go to the render class of your entity:
public class RenderTest<T extends EntityTest> extends RenderLiving<T>
{
public RenderTest(RenderManager manager) {
super(manager, new ModelCraftStudio(ModTutorial.MODID, "my_model", 64, 32), 0.5F);
}
}As you can see, we just need to replace ModelBase by ModelCraftStudio.
The API load your registered resources before the game pre-init to create the 3D render in Minecraft.
We must give some parameters to the constructor of ModelCraftStudio.
new ModelCraftStudio(modidIn, resourceIn, textureWidth, textureHeight);modidIn is the id of your mod,
resourceIn is the name of your 3D model previously registered,
textureWidth and textureHeight are the width and heigth of your texture.
Tip: If the texture is a square, width is the same as height, you can use the function:
new ModelCraftStudio(modidIn, resourceIn, textureWidthAndHeigth);Exemple:
new ModelCraftStudio(ModTutorial.MODID, "my_model", 64);And Voilà ! You now have added your CraftStudio model to your entity !
If you want to animate it, it's here!
○ CraftStudio
-
[EN] Export CraftStudio's Model(s), Animation(s) and Texture
-
[FR] Exporter les Modèles, Animations et Texture de CraftStudio
○ Minecraft Forge
-
JavaDoc(0.1)
-
[FR/EN] Example Mod
-
[EN] Tutorials
- Entities
- Blocks
- Add a render to a block (W.I.P)
- How to animate a block (W.I.P)
-
[FR] Tutoriels
- Entités
- Blocs
- Ajouter un rendu à un bloc (W.I.P)
- Comment animer un bloc (W.I.P)
○ [EN/FR] Version of the Api
