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.

DatenThielt

Members
  • Joined

  • Last visited

  1. DatenThielt changed their profile photo
  2. That's what I get for programming after a few beers. Thanks for the reality slap. The try-catch was hiding the original error line, turned out the raytrace could return null over certain blocks. Fixed and thank you!
  3. Evening all, Trying my first mod here, I've got some code that renders a highlight around air blocks. The code works perfectly, until we come across snow covered blocks, Then it crashes the client with little to no information as to why. Here is the code, and the error below. (the try catch is just for debugging) try { EntityPlayerSP player = Minecraft.getMinecraft().player; World world = player.getEntityWorld(); if (player.getHeldItemMainhand().getItem() == StrapItems.BASIC_STRAP) { ItemBasicStrap myItem = (ItemBasicStrap) player.getHeldItemMainhand().getItem(); RayTraceResult tracer = player.rayTrace(myItem.BlockRange, 1.0F); BlockPos pos = tracer.getBlockPos(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.glLineWidth(3.0F); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); Block state = world.getBlockState(pos).getBlock(); double x = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.getPartialTicks(); double y = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.getPartialTicks(); double z = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.getPartialTicks(); RenderGlobal.drawSelectionBoundingBox(state.FULL_BLOCK_AABB.offset(-x, -y, -z).offset(pos).grow(0.002), 1.0F, 1.0F, 1.0F, 0.4F); GlStateManager.depthMask(true); GlStateManager.enableTexture2D(); GlStateManager.disableBlend(); } } catch (Exception ex) { logger.info("AIR STRAPS AIR STRAPS AIR STRAPS >> {}", ex.getMessage()); } Error Any help would be greatly appreciated!!

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.