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


  • Posts

  • Joined

  • Last visited

blu1980's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. Yes, I've removed that code and used the 'level' object that is passed into the function instead. Thanks!
  2. Wait nevermind you're right the level is literally the second parameter in the function declaration.
  3. 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.
  4. 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.
  • Create New...

Important Information

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