Jump to content

ArcaneDiver

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by ArcaneDiver

  1. Hi, i'm trying to put the player's model in a certain position when he's riding a Dolphin, and i tried use the RenderPlayerEvent event but it never get fired. @SubscribeEvent public static void onPlayerRideRender(RenderPlayerEvent.Pre e) { EmpireOfKnifeThrowers.LOGGER.debug("Pre"); if(e.getPlayer().getRidingEntity() != null && e.getPlayer().getRidingEntity() instanceof RidableDolphinEnitity) { Minecraft.getInstance().player.sendChatMessage("Rendering"); PlayerModel<AbstractClientPlayerEntity> model = e.getRenderer().getEntityModel(); model.bipedBody.rotateAngleX = (float) (-Math.PI / 4); } } @SubscribeEvent public static void render(RenderPlayerEvent.Post e) { EmpireOfKnifeThrowers.LOGGER.debug("Post"); // DEBUG } I also used debug mode in my IDE but it never hit the breakpoint. Pls help.
  2. Then everything must be done on the server?
  3. Hi, i'm trying to spawn my custom dolphine when i right-click a dolphin, in order to do this when the event fires i remove the vanilla dolphin, instantiate my own and make player ride it. Here is the code: @SubscribeEvent public static void onDolphinInteract(PlayerInteractEvent.EntityInteract e) { if(e.getTarget() instanceof DolphinEntity && e.getTarget() != null) { World worldIn = e.getWorld(); DolphinEntity dolphinEntity = (DolphinEntity) e.getTarget(); ClientPlayerEntity player = Minecraft.getInstance().player; if(player != null && player.getRidingEntity() == null) { dolphinEntity.remove(); RidableDolphinEnitity sobstitue = new RidableDolphinEnitity(worldIn); sobstitue.setPosition(dolphinEntity.lastTickPosX, dolphinEntity.lastTickPosY, dolphinEntity.lastTickPosZ); worldIn.addEntity(sobstitue); player.startRiding(sobstitue); } } } But when i test it and i right-click the dolphine disappear and i'm freezed, where i'm wrong?
  4. Hi, how can i control a vanilla entity while i'm riding It? Is there a specific event? Solved by instantiating my own entity that extends the vanillina one when i rightclick the entity, then i override the travel method with some of the horse travel code.
  5. Thanks... i'm new, how i can close this topic??
  6. Hi, i can't figure out how make a dolphin ridable without add a new mob, because if i should just add a new mob that's ridable i should just create a class that extends AnimalEntity but in that way i should register a new mob... Some tips??
  7. I put this. It works, but in some method the name of parameters are p_176208_1_, is it solvable? In my config there was this: mappings channel: 'snapshot', version: '20190719-1.14.3' But i did't understand how choose the version
  8. I can't find some function because their name is func_### than i see that i could resolve this issue by refreshing mappings but can't figure out how do that.
×
×
  • Create New...

Important Information

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