JacobsDevelop Posted March 24, 2021 Posted March 24, 2021 I'm continuing (kinda) my cape topic. After discussion I've decided to make backpack instead of capes, I have backpack model that was created in blockbench and it's exported as .java class. I have two problems: 1. How to implement this model. 2. How to make void or function to render this model on player's back (also I want to make it render on players specified by UUID) There's raw .java backpack model file (it's not in in my files yet): // Made with Blockbench 3.8.3 // Exported for Minecraft version 1.15 - 1.16 // Paste this class into your mod and generate all required imports public class backpack_dev extends EntityModel<Entity> { private final ModelRenderer bb_main; public backpack_dev() { textureWidth = 32; textureHeight = 32; bb_main = new ModelRenderer(this); bb_main.setRotationPoint(0.0F, 24.0F, 0.0F); bb_main.setTextureOffset(0, 0).addBox(-4.0F, -10.0F, -2.0F, 8.0F, 10.0F, 3.0F, 0.0F, false); bb_main.setTextureOffset(0, 13).addBox(-3.0F, -9.0F, 1.0F, 6.0F, 9.0F, 1.0F, 0.0F, false); bb_main.setTextureOffset(0, 23).addBox(-2.0F, -5.0F, 2.0F, 4.0F, 5.0F, 1.0F, 0.0F, false); bb_main.setTextureOffset(0, 30).addBox(-1.0F, -6.0F, 2.0F, 2.0F, 1.0F, 1.0F, 0.0F, false); } @Override public void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){ //previously the render function, render code was moved to a method below } @Override public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){ bb_main.render(matrixStack, buffer, packedLight, packedOverlay); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } Also I don't know why, but I get error when I paste this code into class. Any help would be appreciated. Quote
ChampionAsh5357 Posted March 24, 2021 Posted March 24, 2021 Does it need to be a java model? The same could be accomplished with a json one. Quote
JacobsDevelop Posted March 24, 2021 Author Posted March 24, 2021 I mean I want this model to be rendered always like in capes. If your UUID matches UUID in list you automatically have backpack rendered on your back. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.