Jump to content

MGlolenstine

Members
  • Posts

    106
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MGlolenstine's Achievements

Creeper Killer

Creeper Killer (4/8)

1

Reputation

  1. Oh, then that's a lot more feasible than recoding the whole `ItemRenderer` I'll do that then! Thanks for your help!
  2. Hmm... Would there exist a way to override only one texture? Apparently you can change exactly what I want with a normal resource pack. I could add a resource pack that only changed one item to the mod and then just swap it so that only that one texture changes. Do you think that this would be feasible?
  3. This all seems nice Thanks for the answer! Just one more question... I wanna do this on the client-side only... Will the replacement of the entity mess up with the pickup? Or do I just replace the item on the pickup? I'm a still bit wary about these things, probably because I'm new
  4. I have no idea how I missed the `Items` class... ?‍♂️ Thanks for the tip! And this event it an interesting one... I was looking for one that would be something like `ItemTossedEvent` or something similar, but I guess this is the way to go! As far as the replacing goes, I'd have to "destroy" the entity and then spawn a new custom one on the same position? Any hints on how I'd go about getting the same renderer? Thanks for your help!
  5. I just started with the Forge development, but I was wondering if there was a way, that specific items (Vanilla, non-Vanila) could be rendered twice as big when dropped. What I mean with that is, if I could render dropped items 2x as big? I've looked around, but haven't found anything about overriding renderers, so I'm guessing it would have to be done via lwjgl. Also, how do I check for specific item type, something like `Material.OAK_LOG` from the Bukkit? I'm currently checking it like this: int id = Item.getIdFromItem(e.getEntityItem().getItem().getItem()); if(id == 770){ // Dropped item is a player head! } But I'm unsure if it's the correct way to do it. If this post should be split into two, let me know.
  6. First of all, thank you for replying to this post ?. I was thinking of the same thing, with the hashing and storing everything on the HDD, but I think that the problem with mod updates isa great one, I know you could only rebuild it when mods updare, but still... Thing that I think would be the most trouble, would have to be the different mod distinction, as some mods inject directly into the code and it's hard for Forge to determine which mod the change is coming from. Thanks again, and I hope that we get something along these lines in the future ?
  7. With GlStateManager I don't get the solid lines that I've gotten with GL11... I want those back... is there something I can do about that? It's just like GL11 ones were fully opaque and unbreakable, they were bright, but with GlStateManager lines are much darker, they vanish when I don't want them to, and the color settings are the same... and yes, I've updated Alpha to 255. I still don't understand why it doesn't work
  8. I updated my code to GlStateManager, but now it's not even drawing my lines... if (mode == 1) { Color c = new Color(96, 149, 234, 1); GlStateManager.color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); } else if(mode == 0){ if (entity.getTeam() != null) { Color c = Colors.getColor(entity.getDisplayName().getFormattedText()); GlStateManager.color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); }else{ Color c = new Color(255, 255, 255, 1); GlStateManager.color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); } }else if(mode == 2){ Color c = new Color(255, 0, 0, 1); GlStateManager.color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); }else if(mode == 3){ Color c = new Color(0, 255, 0, 1); GlStateManager.color(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); } GlStateManager.glLineWidth(2f); GlStateManager.disableDepth(); GlStateManager.glBegin(GL11.GL_LINES); Vec3d vec = new Vec3d(0, 0, 1).rotatePitch(-(float) Math.toRadians(Minecraft.getMinecraft().player.rotationPitch)).rotateYaw(-(float) Math.toRadians(Minecraft.getMinecraft().player.rotationYaw)); if(mc.player.isSneaking()) { GlStateManager.glVertex3f((float)vec.x, (float)vec.y + mc.player.eyeHeight-0.08f, (float)vec.z); }else { GlStateManager.glVertex3f((float)vec.x, (float)vec.y + mc.player.eyeHeight, (float)vec.z); } GlStateManager.glVertex3f((float)x, (float)y, (float)z); GlStateManager.glEnd(); GlStateManager.enableDepth();
  9. I'll try GLStateManager, and yeah, I forgot to add the color assignment. I'm asigning it like this if (mode == 1) { Color c = new Color(96, 149, 234, 1); GL11.glColor4d(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); } else if(mode == 0){ if (entity.getTeam() != null) { Color c = Colors.getColor(entity.getDisplayName().getFormattedText()); GL11.glColor4d(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); }else{ Color c = new Color(255, 255, 255, 1); GL11.glColor4d(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); } }else if(mode == 2){ Color c = new Color(255, 0, 0, 1); GL11.glColor4d(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); }else if(mode == 3){ Color c = new Color(0, 255, 0, 1); GL11.glColor4d(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); }
  10. put('0', new Color(0, 0, 0, 255)); put('1', new Color(0, 0, 255, 255)); put('2', new Color(0, 128, 0, 255)); put('3', new Color(0, 102, 102, 255)); put('4', new Color(102, 0, 0, 255)); put('5', new Color(64, 0, 64, 255)); put('6', new Color(192, 128, 0, 255)); put('7', new Color(192, 192, 192, 255)); put('8', new Color(128, 128, 128, 255)); put('9', new Color(0, 0, 128, 255)); put('a', new Color(0, 255, 0, 255)); put('b', new Color(0, 255, 255, 255)); put('c', new Color(255, 0, 0, 255)); put('d', new Color(255, 0, 255, 255)); put('e', new Color(255, 255, 0, 255)); put('f', new Color(255, 255, 255, 255)); as you can see in the top table of colours, I'm having a problem getting all of these colours to show when using this part of the code GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glLineWidth(2f); GlStateManager.disableDepth(); GL11.glBegin(GL11.GL_LINES); Vec3d vec = new Vec3d(0, 0, 1); GL11.glVertex3d(vec.x, vec.y + mc.player.eyeHeight, vec.z); GL11.glVertex3d(x, y, z); GL11.glEnd(); GL11.glEnable(GL11.GL_TEXTURE_2D); GlStateManager.enableDepth(); for example 7 and 8 are the same colour when drawn, and 'e' and '6' are the same as well. I know the colours are similar, but they're not the same. I'm probably using something wrong in the GL11 drawing section, but I don't know what. Thanks!
  11. I don't seem to be able to find appropriate event here. I want to move it a bit lower to improve visibility.
  12. I figured out the removing now... But there is still a problem with rendering... The rotation is still "jittery" as It's probaby not getting executed every render tick. I'm using following command to rotate the item. ei.setPositionAndRotation(ep.prevPosX + (ep.posX - ep.prevPosX) * e.getPartialTicks(), (ep.prevPosY + (ep.posY - ep.prevPosY) * e.getPartialTicks())+3f, ep.prevPosZ + (ep.posZ - ep.prevPosZ) * e.getPartialTicks(), pos.yaw, pos.pitch); but as I said... Is there a way for me to remove that "jitter"
  13. It is... Wait... I might be on to something How can I prevent items from getting spun?
×
×
  • Create New...

Important Information

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