Spaceboy Ross
Members-
Posts
143 -
Joined
-
Last visited
Everything posted by Spaceboy Ross
-
[1.12.2] Getting all files in custom assets folder
Spaceboy Ross replied to Tschipp's topic in Modder Support
getAllResources may be what you're looking for. -
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(); } }
-
What does rendering it mean? I've canceled the game from rendering the player.
-
Well, how do I actually render the player?
-
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); } }
-
Provide me with a fix!!
-
How do I make it work?
-
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); } }
-
@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); } }
-
Ok, got the scaling to work but I cannot get the custom skin to work.
-
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?
-
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); } }
-
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.
-
Yes, I want the model replaced.
-
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]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
Got it, thanks. -
Detect when player right clicks entity [Solved]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
Yes. -
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]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
I fixed the code locally, I just need to update github. -
PlayerEvent.Clone cannot be resolved to a type [Solved]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
Eclipse imported net.minecraftforge.fml.common.gameevent.PlayerEvent automatically. -
Custom NBT data for player doesn't save [Solved]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
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]
Spaceboy Ross replied to Spaceboy Ross's topic in Modder Support
Correct Link: https://github.com/SpaceboyRoss01/MSGundamMod -
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.
-
Ok, fixed I just need to update github.