I'm wondering if it's possible to make a mod where feather falling is actually, feather falling. In other words, I want the players to fall down at a speed of two blocks or so per second, but land and still take the damage they normally would in vanilla minecraft with feather falling. For example, if I had feather falling four and I jumped off a 100 block drop, I would want to fall down at a relatively slow pace (so I can navigate better and more accurately), but still take the damage I normally would, which in this case, would be about 9 hearts. Is it possible? If so, can someone try to make it? :3
This is very interesting and I want to do it. However, I have no power because of a hurricane and probably won't for a few more days, so I can't start. If nobody else takes this up, I'll definitely do it.
That's the one. About 8 trees fell on my street and PSE&G said it won't even enter my town for like 4 days, so..
The falling can be done just fine, it's getting the damage that is pretty much impossible after making a player fall slower.
Just a thought, but maybe as soon as the featherfalling effect starts, it could check how much blocks it dropped, and converts it to normal feather falling damage..
Simple. Make a PlayerMoveEvent and if they are falling (do some checking) set their y velocity to less than what it was. Here's a random code I wrote. I know it won't work, but it gives you an idea on how to do it. Code: @EventHandler public void onPlayerMove (PlayerMoveEvent e) { if (e.getPlayer().isFalling()) { // I know that's not real e.getPlayer().setYVelocity(e.getPlayer().getYVelocity()-1); // Something like that } }
No such thing as isFalling, but you could check Code: Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN); if (block.isEmpty() { //stuff
Ok, I'm doing this. Anyone else who is doing it also feel free, but I want to do it aswell. How do you want this to handle landing in water?
The tough thing is that minecraft doesn't have a uniform way of handling fall damage into water, or so it seems. In places where you land in 3 deep water you can die, but if you jump before going down you can live in 1 deep water.. It's complicated. If you want I can make my own, fair, way?
SUDO CODE: Lies (Move your mouse to reveal the content) Lies (open) Lies (close) Code:java public class Somename extends JavaPlugin implements Listener{public void onEnable(){this.getServer().getPluginManager().registerEvents(this, this);}@EventHandlerpublic void onMove(PlayerMoveEvent event){if(!event.getPlayer().getInventory().getBoots().containsEnchantment(Enchantment.PROTECTION_FALL)&&event.getFrom().getY()>event.getTo().getY()&&!((CraftPlayer) event.getPlayer()).getHandle().onGround){Vector v1 = event.getPlayer().getLocation().getDirection();v1.setY(-2);event.getPlayer().setVelocity(v1.multiply(0.03));event.getPlayer().setFallDistance(0);}}}