Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Location

Recent Profile Visitors

929 profile views

ricepuffz's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I can't quite do that because I'm working on something with a few other people who aren't willing to update. I really am just asking whether I (and anyone else who might still have questions regarding 1.12) can find more help somewhere else
  2. Since the forums dropped support for 1.12 I just wanted to ask if there's anywhere else to look for help. This is pretty much the only forge related forum I could find and I don't really want to give up on a problem which I've been trying to overcome for more than a week and made me learn even more about Java than I did in school. Thank you for every reply
  3. Okay, so since no more replies were coming in I decided to read up on the JVM architecture as well as Java bytecode and ASM and managed to create a coremod to do what I explained in a previous post of mine, which works just fine. Now I'm running into the issue of the skin not loading right, aka even with the standard player model and a skin file which is just a full on 64x64 black and white gradient with no transparent pixels the player looks black and pink like this: I am certain that it's not an issue with the bytecode manipulation itself, but more that my approach is still wrong (or that the png format is not being accepted or whatever), which is why I think that it's okay to continue this thread (correct me if this is straight up a coremodding issue, although I don't really know where else to look for help if not here). This was my last idea so I'm kind of desperate now :" I would be more than glad if someone could help me. (Even suggestions of different approaches or hypotheses would be highly appreciated) If any more information of what I've done so far is required just ask and I'll add it. Also I found this thread where the exact same issue with the skin was present: https://www.minecraftforge.net/forum/topic/44152-bug-only-a-few-custom-skins-work/
  4. Well, how would I go about achieving a different entity texture without coremodding then? As I said, I couldn't figure it out myself by looking at all the forge provided classes. Thanks for all the information though!
  5. I'm pretty sure Mixin didn't exist in 1.12.2 though? I can't find any of the classes you specified in your code in the forge version I am using (forge-1.12.2- Thanks for the idea tho! I'll do some more research on modifying vanilla code tomorrow and see if I can do it myself
  6. Thanks for the info. Still, I'm not sure how to set the texture that is going to be used for the model and after having looked through several classes, including the EntityPlayer class and all its superclasses, I can't seem to find a variable that hold the ResourceLocation to the texture or anything similar. The closest thing I found was: public ResourceLocation getEntityTexture(AbstractClientPlayer entity) { return entity.getLocationSkin(); } in the RenderPlayer class, but I'm quite sure how I would make use of that. My guess would be that I would somehow have to let AbstractClientPlayer::hasSkin always return true and let AbstractClientPlayer::getLocationSkin return the ResourceLocation of the texture I want to use. If I'm absolutely wrong and my approach can't work at all would you mind guiding me in the right direction? Thanks!
  7. Hi, I'm trying to manipulate the player model yet again, but now it's in 1.12.2. This time I wanted to try to replace the player's ModelBiped ModelRenderers, so I did. I replaced only the bipedBody variable but now the player's body part is not being rendered at all. From what I've seen the ModelRenderer contains no methods that actually render the model, which is why I thought that I could just replace it with a different model and still have it render just as before. Here is the code I have so far: private boolean initialized = false; private static final ResourceLocation rl = new ResourceLocation("examplemod", "models/boxbody.png"); ModelBase bodyModel = null; ModelRenderer body = null; @SubscribeEvent public void RenderPlayerEvent(RenderPlayerEvent.Pre event) { if (!initialized) { bodyModel = new ModelBody(); body = new ModelRenderer(bodyModel); event.getRenderer().getMainModel().bipedBody = body; initialized = true; } Minecraft.getMinecraft().renderEngine.bindTexture(rl); } public class ModelBody extends ModelBase { private final ModelRenderer body; public ModelBody() { textureWidth = 64; textureHeight = 32; body = new ModelRenderer(this, 0, 0); body.setRotationPoint(0.0F, 0.0F, 0.0F); body.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16, 0.0F); } @Override public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { body.render(scale); } } Any help or suggestions for a different approach are appreciated
  8. I just managed to fix the issue. For anyone who find this post in the future, I used the following code to do it: Vec3d projectedView = Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getProjectedView(); ClientPlayerEntity playerEntity = Minecraft.getInstance().player; double x = playerEntity.lastTickPosX + (playerEntity.posX - playerEntity.lastTickPosX) * partialTicks; double y = playerEntity.lastTickPosY + (playerEntity.posY - playerEntity.lastTickPosY) * partialTicks; double z = playerEntity.lastTickPosZ + (playerEntity.posZ - playerEntity.lastTickPosZ) * partialTicks; GlStateManager.translated(x - projectedView.x - 0.5d, y - projectedView.y, z - projectedView.z - 0.5d);
  9. Hi, this is my first time posting on here so sorry for everything that I'm gonna do wrong in advance I am currently trying to render custom models using OpenGL. Now I have a mesh which follows the player, but as soon as I go into third person the position of the mesh isn't correct anymore because OpenGL translates from the viewport and not the actual player "eyes" position where the viewport is located in first person (as far as I know). Now my question is, how do I compensate for the offset? Is there a way to get the actual viewport position in relation to the player "eyes" or is there a more elegant solution which I just don't know about. Or maybe 2am is too late for my brain to work properly. Sorry if I ask stupid questions but I just got back into Forge yesterday which is why I'm not quite familiar with all the new stuff. All help is appreciated, thanks in advance :" @SubscribeEvent public void RenderWorldLastEvent(RenderWorldLastEvent event) { float partialTicks = event.getPartialTicks(); ClientPlayerEntity playerEntity = Minecraft.getInstance().player; double x = playerEntity.lastTickPosX + (playerEntity.posX - playerEntity.lastTickPosX) * partialTicks; double y = playerEntity.lastTickPosY + (playerEntity.posY - playerEntity.lastTickPosY) * partialTicks; double z = playerEntity.lastTickPosZ + (playerEntity.posZ - playerEntity.lastTickPosZ) * partialTicks; GlStateManager.pushMatrix(); GlStateManager.translated(-0.5 d, -playerEntity.getEyeHeight(), -0.5 d); GlStateManager.disableCull(); GlStateManager.disableDepthTest(); GlStateManager.disableTexture(); GlStateManager.color4f(1, 1, 1, 1); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder wr = tessellator.getBuffer(); wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION); wr.pos(0, 0, 0).endVertex(); wr.pos(1, 0, 0).endVertex(); wr.pos(1, 0, 1).endVertex(); wr.pos(0, 0, 1).endVertex(); wr.pos(0, 1, 0).endVertex(); wr.pos(1, 1, 0).endVertex(); wr.pos(1, 1, 1).endVertex(); wr.pos(0, 1, 1).endVertex(); tessellator.draw(); GlStateManager.enableCull(); GlStateManager.enableDepthTest(); GlStateManager.enableTexture(); GlStateManager.popMatrix(); }
  • Create New...

Important Information

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