Jump to content

Ragnar

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by Ragnar

  1. I made a custom armor model, now how do I make the model stay in the item? for example, the jetpack mekanism mod.
  2. was this, it worked but I had done just to see how it did, can you explain me how is the model render addBox? I speak the arguments, as they told me about .json models
  3. my class does not extend ItemArmor, how can I render the armor if it does not extend to ItemArmor?
  4. the model does not appear, I do not know if it has to put in init, pre init or do something else
  5. is this right? @SideOnly(Side.CLIENT) public class ModelElectricBoots extends ModelBiped{ ModelRenderer rightLeg; ModelRenderer leftLeg; public ModelElectricBoots() { textureWidth = 64; textureHeight = 64; rightLeg = new ModelRenderer(this, 0, 32); rightLeg.addBox(10F, 1F, 10F, 6, 8, 8); setRotation(rightLeg, 1F, 2F, -1F); rightLeg.setTextureSize(64, 64); rightLeg.mirror = true; rightLeg.setRotationPoint(-1F, -2F, 1F); leftLeg = new ModelRenderer(this, 0, 32); leftLeg.addBox(10F, 1F, 10F, 6, 8, 8); setRotation(rightLeg, 1F, 2F, -1F); leftLeg.setTextureSize(64, 64); leftLeg.mirror = true; leftLeg.setRotationPoint(-1F, -2F, 1F); bipedRightLeg.addChild(rightLeg); bipedRightLeg.addChild(leftLeg); } public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entity); } public void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } } in armor class @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { ModelElectricBoots electricBoots = new ModelElectricBoots(); return electricBoots; }
  6. For you, it's easy, you know how to program, you know how to speak English ...
  7. public class LayerBipedArmor extends LayerArmorBase<ModelBiped> { public LayerBipedArmor(RenderLivingBase<?> rendererIn) { super(rendererIn); } protected void initArmor() { this.modelLeggings = new ModelBiped(0.5F); this.modelArmor = new ModelBiped(1.0F); } @SuppressWarnings("incomplete-switch") protected void setModelSlotVisible(ModelBiped p_188359_1_, EntityEquipmentSlot slotIn) { this.setModelVisible(p_188359_1_); switch (slotIn) { case HEAD: p_188359_1_.bipedHead.showModel = true; p_188359_1_.bipedHeadwear.showModel = true; break; case CHEST: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightArm.showModel = true; p_188359_1_.bipedLeftArm.showModel = true; break; case LEGS: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; break; case FEET: p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; } } protected void setModelVisible(ModelBiped model) { model.setVisible(false); } @Override protected ModelBiped getArmorModelHook(net.minecraft.entity.EntityLivingBase entity, net.minecraft.item.ItemStack itemStack, EntityEquipmentSlot slot, ModelBiped model) { return net.minecraftforge.client.ForgeHooksClient.getArmorModel(entity, itemStack, slot, model); } } I do not see anything that does the model of the armor here
  8. Can you give me a sample code for a modified armor model? just to have a base please
  9. my armor is not crazy, it's just blocks together
  10. I do not mean without programming, I expressed myself poorly, I mean using only eclipse without other programs like the Techne
  11. I just found a tutorial that uses a program called Techne, which after you create the armature it gives you a .java file which is a ready class. And no tutorial that teaches you to do without the program, just writing in class
  12. How to Create Custom Template Armor Without Programs
  13. How many ticks equals one second in the Player Tick Event? I do not know if the tick is the same for everything.
  14. That's what I thought, how can I do it then? using hashmap? UUID and what? I think I can not use boolean in hashmap right? So I thought I'd use Integer (0 for false, 1 for true)
  15. will this work on server? if more than one person is to be used at the same time public static boolean jumpedUp = false; public static boolean jumpedForward = false; public static boolean canReset = false; public static int tick = 0; @SubscribeEvent public static void jumpUp(LivingJumpEvent e) { if (e.getEntity() instanceof EntityPlayer) { EntityPlayer p = (EntityPlayer) e.getEntity(); if (p.inventory.armorItemInSlot(0).getItem() == Items.electricBoots) { if (!(p.capabilities.isCreativeMode) && (!(p.capabilities.isFlying))) { if (!(p.isSneaking()) && (jumpedUp == false)) { p.setVelocity(0, 0.70F, 0); jumpedUp = true; } } } } } public static void jumpForward(EntityPlayer p) { p.setVelocity(p.getLookVec().x, 0.50F, p.getLookVec().z); } @SubscribeEvent public static void pressKey(KeyInputEvent e) { EntityPlayer p = (EntityPlayer) Minecraft.getMinecraft().player; World world = p.getEntityWorld(); if (Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed()) { if (world.isAirBlock(p.getPosition().down())) { if (p.isSneaking() && jumpedUp == true && jumpedForward == false) { jumpForward(p); jumpedForward = true; } } } if (!(world.isAirBlock(p.getPosition().down())) && (canReset == true)) { jumpedUp = false; jumpedForward = false; canReset = false; tick = 0; } } @SubscribeEvent public static void timer(ServerTickEvent e){ if (jumpedUp == true) { if (tick != 140) { tick++; return; } else { canReset = true; } } }
  16. but I wanted it to be like armor, so the item would add armor points. like this but without using ItemArmor and ArmorMaterial, since it is a normal item
  17. how to reduce the damage you receive if you have an item in inventory
  18. now the drawing that shows the hit box seems to be right (or does not appear the box) but the hit box continues from a normal block
  19. https://github.com/Ragnarrrr/Hit-box/blob/master/.gitignore/README.md this is code but there is something very wrong that I am doing the format does not work out what I want and when I put the block and shot and I look at one that is on the floor, the box continues .
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.