Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SideOnly(Side.CLIENT)
- public class Model_Fox extends ModelBase {
- public ModelRenderer %name%;
- public Model_Fox() {
- this.textureWidth = 64;
- this.textureHeight = 64;
- this.%name% = new ModelRenderer(this, %u%, %v%);
- this.%name%.setRotationPoint(%originX%, %originY%, %originZ%);
- this.%name%.addBox(%offsetX%, %offsetY%, %offsetZ%, %width%, %height%, %depth%);
- this.setRotationAngles(this.%name%, %rotX%, %rotY%, %rotZ%);
- //Optional would need a child/parent system for elements, used to animate the models
- this.%name%.addChild(this.%name%);
- }
- @Override
- public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float rotationYaw, float rotationPitch, float scale) {
- super.render(entity, limbSwing, limbSwingAmount, ageInTicks, rotationYaw, rotationPitch, scale);
- setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, rotationYaw, rotationPitch, scale, entity);
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- GlStateManager.colorLogicOp(GlStateManager.LogicOp.AND);
- this.%name%.render(scale);
- GlStateManager.disableBlend();
- }
- public void setRotationAngles(ModelRenderer modelRenderer, float x, float y, float z) {
- modelRenderer.rotateAngleX = x;
- modelRenderer.rotateAngleY = y;
- modelRenderer.rotateAngleZ = z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement