Skip to content

Commit

Permalink
Fix step FP with partial empty block
Browse files Browse the repository at this point in the history
  • Loading branch information
Elikill58 committed Jan 11, 2024
1 parent 42cc1f1 commit 8c983a8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.elikill58.negativity.api.entity.Player;
import com.elikill58.negativity.api.events.Listeners;
import com.elikill58.negativity.api.events.player.PlayerMoveEvent;
import com.elikill58.negativity.api.item.Material;
import com.elikill58.negativity.api.item.Materials;
import com.elikill58.negativity.api.location.Location;
import com.elikill58.negativity.api.potion.PotionEffectType;
Expand Down Expand Up @@ -63,8 +64,9 @@ public void onPlayerMoveDifBoost(PlayerMoveEvent e, NegativityPlayer np) {
return; // will go down
Location from = e.getFrom(), to = e.getTo();
Location down = to.clone().sub(0, 1, 0);
String downId = down.getBlock().getType().getId();
if (downId.contains("SHULKER"))
Material downType = down.getBlock().getType();
String downId = downType.getId();
if (downId.contains("SHULKER") || downType.isTransparent())
return;
double dif = to.getY() - from.getY();
double amplifier = (p.hasPotionEffect(PotionEffectType.JUMP) ? p.getPotionEffect(PotionEffectType.JUMP).get().getAmplifier() : 0);
Expand Down

0 comments on commit 8c983a8

Please sign in to comment.