Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MGlolenstine

Members
  • Joined

  • Last visited

Everything posted by MGlolenstine

  1. Now I'm having an NPE at this line... It's interesting as it hasn't been there before... doRender(ei, ep.posX, ep.posY, ep.posZ, ep.cameraYaw, mc.getRenderPartialTicks()); It's the line I use to call the onRender method I posted above... When I surround it with try/catch and I put in System.out.println(ei+", "+ ep.posX+", "+ ep.posY+", "+ ep.posZ+", "+ ep.cameraYaw+", "+ mc.getRenderPartialTicks()); I get EntityItem['item.item.compass'/3916, l='MpServer', x=0.00, y=0.00, z=0.00], 0.5, 22.0, 0.5, 0.0, 0.43997753 in the console FIXED THE NPE
  2. like this? IBakedModel ibakedmodel = mc.getRenderItem().getItemModelWithOverrides(entity.getItem(), entity.world, null);
  3. Can you suggest me something else? I'll gladly accept it.
  4. I changed event, and now I get a NPE on this line IBakedModel ibakedmodel = ri.getItemModelWithOverrides(entity.getItem(), entity.world, null);
  5. let me check... will report It's not... hmm I think I know why... my class extends TESR...
  6. Would this work? private static final Minecraft mc = Minecraft.getMinecraft(); static RenderItem ri = mc.getRenderItem(); public static void doRender(EntityItem entity, double x, double y, double z, float entityYaw, float partialTicks) { ItemStack itemstack = entity.getItem(); int i = itemstack.isEmpty() ? 187 : Item.getIdFromItem(itemstack.getItem()) + itemstack.getMetadata(); boolean flag = false; GlStateManager.enableRescaleNormal(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); RenderHelper.enableStandardItemLighting(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.pushMatrix(); IBakedModel ibakedmodel = ri.getItemModelWithOverrides(itemstack, entity.world, null); GlStateManager.translate(x, y+3f, z); ri.renderItem(itemstack, ibakedmodel); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); } EDIT: Just tried it and it isn't rendering anything... What's wrong with above code?
  7. How can I display them in world? I wanted to draw a quad and then show an item texture in it... How can I do that with models?
  8. How can I display them in world? I wanted to draw a quad and then show an item texture in it... How can I do that with models?
  9. Sorry for necrobumping this thread, but I was wondering how I'd do this in 1.12, because Item.getTextureLocation() doesn't exist anymore.
  10. But how would I do it?
  11. I'm trying to prevent loading of normal vanilla blocks without changing any metadata or tile entitying it... I want to make it similar to XRay... I'm making ore radar that makes blocks around you in a radius transparent/non-rendered...
  12. Well... I want to intercept the render... But I don't know how... Can I do it through event and which one to use then? I wanted to use RenderWorldEvent for that, but it doesn't exist anymore. And yea, I want to change all the blocks of the same type Aaaand I can't change blocks, so it has to be a render event.
  13. Is there any other way I could go about it?
  14. Sorry didn't know that you others prefer Proxies
  15. Sorry for being wrong I guess...
  16. I think it's fired twice for CLIENT and twice for SERVER, add @SideOnly(Side.CLIENT) above EventBusSubscriber And make a counter of clicks, when the button is pressed, increase it by one and when it's 1, reset it to 0, only proceed when the counter is 0.
  17. I want to not render certain blocks inside certain chunks. I want there to be no texture in the place of the block... something like XRay... and 1 more question... What happened to RenderWorldEvent? I don't seem to be able to find it
  18. Is there a packet I can send to server?
  19. How do I set player to be always sneaking? Minecraft.getMinecraft().player.setSneaking(true); Doesn't appear to be working.
  20. In previous versions of Forge, I used this code to check if a person was standing on the edge of a block if (!mc.thePlayer.worldObj.getCollidingBoundingBoxes(mc.thePlayer, mc.thePlayer.getEntityBoundingBox().offset(mc.thePlayer.motionX, -1, mc.thePlayer.motionZ)).isEmpty()) return; How would I do that in 1.12? As far as I've been trying to get the worldObj, it doesn't seem that the normal world has getCollidingBoundingBoxes method included.
  21. I only want to render ears for the local player and I'm calling it from RenderLivingEvent.Post event

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.