Everything posted by Spaceboy Ross
-
[1.12.2] Getting all files in custom assets folder
getAllResources may be what you're looking for.
-
Custom player rendering
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(); } }
-
Custom player rendering
What does rendering it mean? I've canceled the game from rendering the player.
-
Custom player rendering
Well, how do I actually render the player?
-
Custom player rendering
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); } }
-
Custom player rendering
Provide me with a fix!!
-
Custom player rendering
How do I make it work?
-
Custom player rendering
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); } }
-
Custom player rendering
@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); } }
-
Custom player rendering
Ok, got the scaling to work but I cannot get the custom skin to work.
-
Custom player rendering
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?
-
Custom player rendering
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); } }
-
Custom player rendering
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.
-
Make player custom entity [Solved]
Yes, I want the model replaced.
-
Make player custom entity [Solved]
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.
-
Detect when player right clicks entity [Solved]
Got it, thanks.
-
Detect when player right clicks entity [Solved]
Yes.
-
Detect when player right clicks entity [Solved]
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.
-
Custom NBT data for player doesn't save [Solved]
I fixed the code locally, I just need to update github.
-
PlayerEvent.Clone cannot be resolved to a type [Solved]
Eclipse imported net.minecraftforge.fml.common.gameevent.PlayerEvent automatically.
-
PlayerEvent.Clone cannot be resolved to a type [Solved]
I'm trying to add the PlayerEvent.Clone class to the playerClone event but Eclipse is telling me that PlayerEvent.Clone doesn't exist.
-
Custom NBT data for player doesn't save [Solved]
I was following the capability code from https://github.com/Choonster-Minecraft-Mods/TestMod3/tree/b3d71dfddf7f212f0d86ef36e6ae1d06b8493ebc/src/main/java/choonster/testmod3/capability.
-
Custom NBT data for player doesn't save [Solved]
Correct Link: https://github.com/SpaceboyRoss01/MSGundamMod
-
Custom NBT data for player doesn't save [Solved]
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.
-
GUI shows then hides [Solved]
Ok, fixed I just need to update github.
IPS spam blocked by CleanTalk.