Use non-deprecated methods from BlockRay, ensure that a hit is selected
@@ -1623,7 +1623,8 @@ protected Object parseValue(CommandSource source, CommandArgs args) throws Argum
} else if (xStr.equals("#target") && source instanceof Entity) {
Optional<BlockRayHit<World>> hit = BlockRay
.from(((Entity) source))
- .stopFilter(BlockRay.continueAfterFilter(BlockRay.onlyAirFilter(), 1))
+ .select(BlockRay.notAirFilter())
+ .whilst(BlockRay.continueAfterFilter(BlockRay.onlyAirFilter(), 1))
.build()
.end();
if (!hit.isPresent()) {
