/** * Checks if the player is on ice. * * @return true, if the player is on ice */ public boolean isOnIce() { if (onIce == null) { // TODO: Use a box here too ? // TODO: check if player is really sneaking (refactor from survivalfly to static access in // Combined ?)! if (blockFlags != null && (blockFlags.longValue() & BlockProperties.F_ICE) == 0) { // TODO: check onGroundMinY !? onIce = false; } else { final int id; if (player.isSneaking() || player.isBlocking()) { id = getTypeId(blockX, Location.locToBlock(minY - 0.1D), blockZ); } else { id = getTypeIdBelow().intValue(); } onIce = BlockProperties.isIce(id); } } return onIce; }