
Lyon
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by Lyon
-
Hello there, I have question. I have to projects in Eclipse mod1 and mod2 and mod1 is depending on mod2. So to start minecraft with mod1, mod2 has to be installed. Is there a way to run minecraft with both mods at the same time in Eclipse?
-
Just override the "onNeighbourUpdated" method and make your block break, if the blocks under your block has been broken.
-
Hello there, I created a really big entity (width: 26 blocks and height: 60 blocks) and i tried to apply the default minecraft wander ai to it, but that made the server thread literally freeze. If someone has an idea what I can do about that, please go ahead and let me know.
-
Hello, I created a block in which I want to render a smaller cube. As I want to resize the smaller cube I am using a TESR to render it. The problem is, that the face at the bottom of the block is being rendered like the top face. So, if I look down on it it is visible, but when I look up to it it is invisible. I really have no clue what the problem is, so every help is appreciated. Images: BlockVaporator: TileEntityRendererVaporator:
-
Thank you very much. Fixed it.
-
Thank you very much for your replies. I tried your recommendations and found, that adding the velocity only on the server and using the update frequency, that vanilla uses for EntityArrow (20) works the best. EntityBullet: EntityRegistry:
-
Hello everyone, I created a bullet, which can be shot using a rifle. Everything is working as it should. The problem is, that the bullet is not moving smoothly through the air. Very often it glitches back. As I'm not sure how to fix this issue, I would appreciate any help. EntityBullet: RenderBullet: ModelBullet: Utils:
-
So I improved some things and everything is working well in Eclipse. But when I build the mod and launch it in minecraft, the item rendering isn't cancelled. Here is my new code: ItemRenderHandler: SpecialLayerHeldItem:
-
I got it working, but I am not sure if it is the best solution. Thank you very much! However here is my code:
-
So I managed to render the item into the Player's hand, but how can I cancel the normal rendring of the the item.
-
But is there a way to change the item rotation based on the direction the player is looking?
-
Hello, I added an item, which makes the player's arm point in the direction the player is looking. The rendering of the arm is working, but the item is always rendering at the body of the player. I know there is the LayerHeldItem class, which renders the item, but i don't know how to remove the normal LayerHeldItem and add a new one. Is there also a way to do this without creating a new RenderPlayer class? Here is my code:
-
@Animefan8888 Now it's working really well. Thank so much ?. Here's my code: LampHandler: Utils:
-
[SOLVED] modelBiped arm rendered on wrong player [1.12.2]
Lyon replied to eatthenight's topic in Modder Support
You have to call "event.getRenderer().bindTexture(event.getRenderer().getEntityTexture((AbstractClientPlayer)event.getEntityPlayer()));" before rendering. -
Thank you very much for replying. @Animefan8888 I added "GlStateManager.translate" like you advised eatthenight in his thread. Now the arms are rendering at the right spot, but they're glitching back and forth as I move. Is there a way to fix this? Here's my new code:
-
Hello, I want to add a lantern, which is held by the player with streched out arms. I already managed to render the arms when holding a lantern in hand. But if another player is also rendered, the arm of the other player is rendered at my position. Is there some way to fix this ? Help would be appreciated. Here is my code: ToolLamp: public class ToolLamp extends ItemBase { public ToolLamp(String name) { super(name); setMaxStackSize(1); } } LoginHandler: public class LoginHandler { @SideOnly(Side.CLIENT) @SubscribeEvent public void onLogin(EntityJoinWorldEvent event) { if(event.getEntity() instanceof EntityPlayer && event.getWorld().isRemote) { MinecraftForge.EVENT_BUS.register(new LampHandler()); } } } LampHandler: public class LampHandler { public LampHandler() { } @SideOnly(Side.CLIENT) @SubscribeEvent public void onPreRender(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); if(player.getHeldItem(EnumHand.MAIN_HAND).getItem().equals(ItemInit.Lamp)) { event.getRenderer().getMainModel().bipedRightArm.isHidden=true; event.getRenderer().getMainModel().bipedRightArmwear.isHidden=true; } if(player.getHeldItem(EnumHand.OFF_HAND).getItem().equals(ItemInit.Lamp)) { event.getRenderer().getMainModel().bipedLeftArm.isHidden=true; event.getRenderer().getMainModel().bipedLeftArmwear.isHidden=true; } } @SideOnly(Side.CLIENT) @SubscribeEvent public void onPostRender(RenderPlayerEvent.Post event) { EntityPlayer player = event.getEntityPlayer(); float yRotationPoint = 20.5F; if(player.isSneaking()) { yRotationPoint = 16.5F; } if(player.getHeldItem(EnumHand.MAIN_HAND).getItem().equals(ItemInit.Lamp)) { //rotate arm event.getRenderer().getMainModel().bipedRightArm.isHidden=false; event.getRenderer().getMainModel().bipedRightArm.rotationPointX = -MathHelper.cos((float)Math.toRadians(player.renderYawOffset)) * 4.2F; event.getRenderer().getMainModel().bipedRightArm.rotationPointY = yRotationPoint; event.getRenderer().getMainModel().bipedRightArm.rotationPointZ = -MathHelper.sin((float)Math.toRadians(player.renderYawOffset)) * 5.0F; event.getRenderer().getMainModel().bipedRightArm.rotateAngleX = (float)Math.toRadians(90.0F); event.getRenderer().getMainModel().bipedRightArm.rotateAngleY = (float)-Math.toRadians(player.renderYawOffset); event.getRenderer().getMainModel().bipedRightArm.rotateAngleZ = 0.0F; event.getRenderer().bindTexture(event.getRenderer().getEntityTexture((AbstractClientPlayer)player)); event.getRenderer().getMainModel().bipedRightArm.renderWithRotation(0.0625F); event.getRenderer().getMainModel().bipedRightArm.rotationPointY = 2.0F; } if(player.getHeldItem(EnumHand.OFF_HAND).getItem().equals(ItemInit.Lamp)) { //rotate arm event.getRenderer().getMainModel().bipedLeftArm.isHidden=false; event.getRenderer().getMainModel().bipedLeftArm.rotationPointX = MathHelper.cos((float)Math.toRadians(player.renderYawOffset)) * 4.2F; event.getRenderer().getMainModel().bipedLeftArm.rotationPointY = yRotationPoint; event.getRenderer().getMainModel().bipedLeftArm.rotationPointZ = MathHelper.sin((float)Math.toRadians(player.renderYawOffset)) * 5.0F; event.getRenderer().getMainModel().bipedLeftArm.rotateAngleX = (float)Math.toRadians(90.0F); event.getRenderer().getMainModel().bipedLeftArm.rotateAngleY = (float)-Math.toRadians(player.renderYawOffset); event.getRenderer().getMainModel().bipedLeftArm.rotateAngleZ = 0.0F; event.getRenderer().bindTexture(event.getRenderer().getEntityTexture((AbstractClientPlayer)player)); event.getRenderer().getMainModel().bipedLeftArm.renderWithRotation(0.0625F); event.getRenderer().getMainModel().bipedLeftArm.rotationPointY = 2.0F; } } }