Jump to content

eatthenight

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by eatthenight

  1. capabilities have to be synced too so no you must use packets and its not that difficult to be honest. https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
  2. get the player look vec3? and then you can accelerate in that direction
  3. I didnt made the model one of my modelers made it so i didnt know, anyway i overlooked this: Texture hxhmod:textures/block/joystation.png with size 676x676 will have visual artifacts at mip level 4, it can only support level 2. Please report to the mod author that the texture should be some multiple of 16x16. so it has to do with the size of the texture
  4. so i have a custom model made for me and somehow the texture is glitched when placed but not when the player holds the item block and i dont know what it could be cause this is my first time using custom block models. blockstate json file: model json file: any ideas?
  5. Minecraft.getMinecraft().player (dont know if this changed in 1.14 but probably not) this will always give you the client player
  6. rendering the obj model as an entity would work too but i really dont know where to begin, so would be nice if someone can help me out.
  7. so i added a layer to the player and i want to render an obj model i made based on values in my player capability, how do i load obj models and render them? i read that you have to write your own parser but as i have no clue to how to do that are there any tutorials or maybe open source code i could use for reference? i dont know much about opengl rendering outside from basic minecraft stuff so this is difficult for me thanks
  8. so im currently workin on a rpg type level up system, that means the player will obviously be able to improve his attack defense and all that.. but now i was wondering cuz i want the player to have big numbers as health up to like 1000 or even more, should i directly modify the players entity attributes or what's yall suggestion? my idea was: saving custom health and maxHealth values (i think modifying the entity attributes only works up to some values) in my capability and every time the player gets hurt i would calculate the damage with using my stats values if the health of my own stored value drops below zero i would set the actual health value to zero and that would kill the player. would this be any good? what would be the best approach if i want the player to level his health? as like my abilities and all will do much damage (and i want the damage to be much higher as the vanilla) i was wondering what would be the "best" way to do this how would yall do this? thanks
  9. i answered his question how you load something on only one side. i know that registering the gui in the client proxy is enough. and well no you can set the side of the event too with SideOnly(Side.Client) so the event will only be called on the client side but you’re right registering in a client proxy would be the most convenient way probably..
  10. @SideOnly(Side.CLIENT) also register your gui in your client proxy
  11. subscribe to the playertickevent check if the player is in water then add potion effect
  12. try EntityPlayer#isInsideOfMaterial and use Material.WATER as parameter thats the dirty way to do it but should work i think..
  13. you could check if the player is inside water i think there was a way to get if the player is underwater
  14. works now after fixing my packets but somehow the arm texture is not rendered correctly on other clients..
  15. so i tried to translate by using some test values and it seems the other player sees the player who meditates with no arms so now its not even rendered? on the client who meditates its rendered with the offset i used for GLStateManage.translate... EDIT: the client player only sometimes gets the data if the player meditates seems like i have to fix my packets for meditating.
  16. in the pre event i only set the arms hidden and i dont have anything else in my post event either aside from what i posted.
  17. so i have a pose which should be rendered when the player is mediating, which works fine but only in singleplayer. somehow in multiplayer the player who mediates his arms are rendered correctly on the client but other players see him with no arms and his arms are rendered on their own model. here is a screenshot though its hard to show it properly.. player who meditates: in RenderPlayerEvent.Pre i set the arms hidden and in the post event i set the rotation and render the arm: if(event.getEntityPlayer().getCapability(NenProvider.NEN_CAP, null).isMeditating()) { event.getRenderer().getMainModel().bipedRightArm.isHidden = false; event.getRenderer().getMainModel().bipedRightArm.rotationPointZ = -MathHelper.sin((float) Math.toRadians(event.getEntityPlayer().renderYawOffset)) * 5.0F; event.getRenderer().getMainModel().bipedRightArm.rotationPointY = 20; event.getRenderer().getMainModel().bipedRightArm.rotationPointX = -MathHelper.cos((float) Math.toRadians(event.getEntityPlayer().renderYawOffset)) * 5.0F; event.getRenderer().getMainModel().bipedRightArm.rotateAngleX = (float) -1.0; event.getRenderer().getMainModel().bipedRightArm.rotateAngleY = (float) -Math.toRadians(event.getEntityPlayer().renderYawOffset); event.getRenderer().getMainModel().bipedRightArm.rotateAngleZ = (float) 3.4; event.getRenderer().getMainModel().bipedRightArm.renderWithRotation(0.0625F); event.getRenderer().getMainModel().bipedRightArm.rotationPointY = 2; event.getRenderer().getMainModel().bipedLeftArm.isHidden = false; event.getRenderer().getMainModel().bipedLeftArm.rotationPointZ = -MathHelper.sin((float) Math.toRadians(event.getEntityPlayer().renderYawOffset)) * -5.0F; event.getRenderer().getMainModel().bipedLeftArm.rotationPointY = 20; event.getRenderer().getMainModel().bipedLeftArm.rotationPointX = -MathHelper.cos((float) Math.toRadians(event.getEntityPlayer().renderYawOffset)) * -5.0F; event.getRenderer().getMainModel().bipedLeftArm.rotateAngleX = (float) -1.0; event.getRenderer().getMainModel().bipedLeftArm.rotateAngleY = (float) -Math.toRadians(event.getEntityPlayer().renderYawOffset); event.getRenderer().getMainModel().bipedLeftArm.rotateAngleZ = (float) -3.4; event.getRenderer().getMainModel().bipedLeftArm.renderWithRotation(0.0625F); event.getRenderer().getMainModel().bipedLeftArm.rotationPointY = 2; }
  18. exactly but what im confused about is event.getEntityPlayer() should give the player who's rendered if im not mistaken? but why does it render on the client player and not on the player who's actually mediating? like the arms are rendered on the position of the client players arms..... but i use the values of event.getEntityPlayer() to set the position so it should be rendered on the correct position? it seems somehow event.getEntityPlayer gives me the wrong player? im rotating the arms of the right player just the position is wrong cuz when i mediate my player has no arms.
  19. but how do you do that? how do i get the model of other players and change the rotation of arms and stuff..? idk because it seems everything works fine except the position is set to the clients player arms and not of the player who’s actually mediating..
  20. i have the exact same problem with my mediating pose.. but doing it that way it would only render correctly for the client player and not for every other player too. basically im in multiplayer and if the other player meditates, his arms are rendered on mine ://
  21. im currently workin on the feature to charge for my custom abilities. i have a player capability which stores all abilities and values like if the player is charging.. i use PlayerInteractEvent.RightClickEmpty event where i check which ability is selected and start the initial charging, but now i need to check if the right click button was released to stop the charging and do the ability stuff. how do i check if the player holds rightclick so i can send a packet to stop charging when right click was released? can i somehow get the vanilla keybindings and check if the key is down? @SubscribeEvent public void onRightClickNenSkill(PlayerInteractEvent.RightClickEmpty event) { EntityPlayer player = event.getEntityPlayer(); INen nen = player.getCapability(NenProvider.NEN_CAP, null); if(player.getHeldItemMainhand().isEmpty() && player.getHeldItemOffhand().isEmpty()) { if(event.getHand() == EnumHand.MAIN_HAND) { int index = GuiIngameNenSkills.getIndex(); if(nen.getSkills().size() > index) { System.out.println("YOU USED YOUR SKILL " + nen.getSkills().get(index).getId()); PacketHandler.INSTANCE.sendToServer(new PacketActivateSkill(index)); } } } }
×
×
  • Create New...

Important Information

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