Jump to content

blu1980

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by blu1980

  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.
×
×
  • Create New...

Important Information

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