Jump to content

Spaceboy Ross

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by Spaceboy Ross

  1. It doesn't render correctly and it renders upsidedown. GitHub: https://github.com/SpaceboyRoss01/MSGundamMod To recreate the bug, right click on an entity called RX-78-2 Gundam. @SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); IHumanCapability nt = Human.getHuman(player); MobileSuit.MSMob msmob = nt.getMS(); if(msmob != null) { MobileSuit ms = msmob.getMSRegistryEntry(); event.getRenderer().bindTexture(new ResourceLocation(ms.getBaseResourceLocation()+".png")); event.setCanceled(true); GlStateManager.pushMatrix(); event.getRenderer().getMainModel().bipedHead.render(0.0625F*msmob.scale); event.getRenderer().getMainModel().bipedBody.render(0.0625F*msmob.scale); event.getRenderer().getMainModel().bipedLeftLeg.render(0.0625F*msmob.scale); event.getRenderer().getMainModel().bipedRightLeg.render(0.0625F*msmob.scale); event.getRenderer().getMainModel().bipedLeftArm.render(0.0625F*msmob.scale); event.getRenderer().getMainModel().bipedRightArm.render(0.0625F*msmob.scale); GlStateManager.popMatrix(); } }
  2. What does rendering it mean? I've canceled the game from rendering the player.
  3. Well, how do I actually render the player?
  4. The game freezes when my code runs. @SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); IHumanCapability nt = Human.getHuman(player); MobileSuit.MSMob msmob = nt.getMS(); if(msmob != null) { MobileSuit ms = msmob.getMSRegistryEntry(); GL11.glScalef(msmob.scale,msmob.scale,msmob.scale); event.getRenderer().bindTexture(new ResourceLocation(ms.getBaseResourceLocation()+".png")); event.getRenderer().doRender((AbstractClientPlayer)player,event.getX(),event.getY(),event.getZ(),player.cameraYaw,event.getPartialRenderTick()); event.setCanceled(true); } }
  5. It's still not working. @SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); IHumanCapability nt = Human.getHuman(player); MobileSuit.MSMob msmob = nt.getMS(); if(msmob != null) { MobileSuit ms = msmob.getMSRegistryEntry(); GL11.glScalef(msmob.scale,msmob.scale,msmob.scale); event.getRenderer().bindTexture(new ResourceLocation(ms.getBaseResourceLocation()+".png")); event.getRenderer().doRender((AbstractClientPlayer)player,event.getX(),event.getY(),event.getZ(),player.cameraYaw,event.getPartialRenderTick()); event.setCanceled(true); } }
  6. @SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Pre event) { EntityPlayer player = event.getEntityPlayer(); IHumanCapability nt = Human.getHuman(player); MobileSuit.MSMob msmob = nt.getMS(); if(msmob != null) { MobileSuit ms = msmob.getMSRegistryEntry(); event.getRenderer().bindTexture(new ResourceLocation(ms.getBaseResourceLocation()+".png")); GL11.glScalef(msmob.scale,msmob.scale,msmob.scale); event.setCanceled(true); } }
  7. Ok, got the scaling to work but I cannot get the custom skin to work.
  8. Ok, it's no longer null but the player is still the same size and still has the same skin. How do I render the new skin and entity size?
  9. It crashed for me. GitHub: https://github.com/SpaceboyRoss01/MSGundamMod. @SubscribeEvent public static void onRenderPlayer(RenderPlayerEvent.Post event) { EntityPlayer player = event.getEntityPlayer(); IHumanCapability nt = Human.getHuman(player); MobileSuit.MSMob msmob = nt.getMS(); if(msmob != null) { MobileSuit ms = msmob.getMSRegistryEntry(); ResourceLocation texture = new ResourceLocation(ms.getBaseResourceLocation()+".png"); event.getRenderer().bindTexture(texture); GL11.glScalef(msmob.scale,msmob.scale,msmob.scale); } }
  10. I've added the onRender event to my code but I cannot figure out how to render a different texture and change the player size.
  11. I'm trying to make it so when the processInteract function runs it makes the player replace the custom entity like how in iChun's morph mod does it. I also need a way to reverse it in my InputHandler class.
  12. I'm trying to have a function run when a player right clicks an entity and then to have the player ride it but I need the player to be positioned at a specific spot so they could see but their model isn't visible. I'm trying to do this in 1.12.
  13. I fixed the code locally, I just need to update github.
  14. Eclipse imported net.minecraftforge.fml.common.gameevent.PlayerEvent automatically.
  15. I'm trying to add the PlayerEvent.Clone class to the playerClone event but Eclipse is telling me that PlayerEvent.Clone doesn't exist.
  16. I was following the capability code from https://github.com/Choonster-Minecraft-Mods/TestMod3/tree/b3d71dfddf7f212f0d86ef36e6ae1d06b8493ebc/src/main/java/choonster/testmod3/capability.
  17. Correct Link: https://github.com/SpaceboyRoss01/MSGundamMod
  18. This week, I've added capabilities into my mod and I try to save the newtype NBT data but the data doesn't get saved. GitHub: https://github.com/SpaceboyRoss01/MSGundam.
×
×
  • Create New...

Important Information

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