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.

blu1980

Members
  • Joined

  • Last visited

  1. Is there a way to change the properties of vanilla lava before spawning it in to stop it from flowing and spreading fire to surrounding blocks?
  2. Yes, I've removed that code and used the 'level' object that is passed into the function instead. Thanks!
  3. Wait nevermind you're right the level is literally the second parameter in the function declaration.
  4. Oh I see. So I need to run the code server side instead. How do I do that? Sorry if it's a stupid question, somewhat new to modding.
  5. Here is the code I'm working on currently: @Override public void onArmorTick(ItemStack stack, Level level, Player player) { super.onArmorTick(stack, level, player); if(player.isOnGround() && !onGround) { onGround = true; if(Minecraft.getInstance().level != null) { List<Entity> entities = Utils.getEntities(Minecraft.getInstance().level, player.getBlockX(), player.getBlockZ(), 6); for(Entity e : entities) { if(!e.equals(player)) { e.hurtMarked = true; e.hurt(DamageSource.OUT_OF_WORLD, 5f); } } } } else { if(!player.isOnGround()) onGround = false; } } My problem is that I can't get e.hurt() to work properly. It doesn't seem to do anything in game. EDIT: It's working now, I mistakenly used the Minecraft class to get the client level instead of the level provided in the function parameters. oops.

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.