Jump to content

Kahel

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Kahel

  1. I tough of this solution but imagine the render method changes in future versions or is used in other mods. It's kind the same problem as overriding the model.
  2. Hello, I've been looking all day to a way to animate any BidepModel (player, zombie, squelleton, any other biped, vanilla or not...) with the same animation/pose (all biped having the same "structure" arms, legs...). My first approach was to use the render event hook that way: @SubscribeEvent public void onRenderBiped(RenderLivingEvent.Pre event){ /*ICaster caster = CasterHandler.getCaster(event.getEntity()); if(caster!=null) { ModelPlayer modelplayer = event.getRenderer().getMainModel(); modelplayer.bipedRightArm. }*/ if(event.getRenderer().getMainModel() instanceof ModelBiped) { event.setCanceled(true); ModelBiped model = (ModelBiped)event.getRenderer().getMainModel(); model.bipedRightArm.rotateAngleX = 5f; } } but it does'nt work (because the rotate angle values are overrided by the model render method, and of course if I use RenderLivingEvent.Post the model is already rendered so it's too late). I found some answers saying to create a custom BipedModel but it would mean to create as many Renderer as biped entity to override the vanilla BipedModel (and is it even possible?), plus would'nt it be a compatibility-killer? Is there a better maintenable solution?
  3. I'm looking anywhere in the source code but can't find why the player is slowed down when he's using an item
  4. Hey, I'm trying to make an item not slowing down the player when it's used. For the moment I made a function in my Item extended class @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { playerIn.setActiveHand(handIn); //... return new ActionResult<ItemStack>(EnumActionResult.PASS, playerIn.getHeldItem(handIn)); } I can't even find where in the code the speed is changing when an item is used. Thanks for your help.
×
×
  • Create New...

Important Information

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