mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 09:16:20 +02:00
Eclipse auto cleanup
This commit is contained in:
parent
ba048bd8de
commit
4cc22001c2
@ -39,7 +39,7 @@ public final class FollowCmd extends Command
|
||||
|
||||
Entity entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
|
@ -89,7 +89,7 @@ public final class GoToCmd extends Command
|
||||
{
|
||||
LivingEntity entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
|
||||
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
|
||||
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
|
@ -129,7 +129,7 @@ public final class PathCmd extends Command
|
||||
{
|
||||
LivingEntity entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
|
||||
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
|
||||
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
|
@ -40,7 +40,7 @@ public final class ProtectCmd extends Command
|
||||
|
||||
Entity entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
|
@ -67,7 +67,7 @@ public final class TpCmd extends Command
|
||||
{
|
||||
LivingEntity entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
|
||||
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
|
||||
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
|
@ -452,7 +452,7 @@ public final class AutoLibrarianHack extends Hack
|
||||
Stream<VillagerEntity> stream =
|
||||
StreamSupport.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> !e.isRemoved())
|
||||
.filter(e -> e instanceof VillagerEntity)
|
||||
.filter(VillagerEntity.class::isInstance)
|
||||
.map(e -> (VillagerEntity)e).filter(e -> e.getHealth() > 0)
|
||||
.filter(e -> player.squaredDistanceTo(e) <= rangeSq)
|
||||
.filter(e -> e.getVillagerData()
|
||||
|
@ -234,7 +234,7 @@ public final class CrystalAuraHack extends Hack implements UpdateListener
|
||||
.reversed();
|
||||
|
||||
return StreamSupport.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof EndCrystalEntity)
|
||||
.filter(EndCrystalEntity.class::isInstance)
|
||||
.filter(e -> !e.isRemoved())
|
||||
.filter(e -> player.squaredDistanceTo(e) <= rangeSq)
|
||||
.sorted(furthestFromPlayer)
|
||||
|
@ -150,7 +150,7 @@ public final class FollowHack extends Hack
|
||||
{
|
||||
entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(
|
||||
e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
|
@ -85,7 +85,7 @@ public final class GlideHack extends Hack
|
||||
|
||||
// manual collision check, since liquids don't have bounding boxes
|
||||
if(stream.map(BlockUtils::getBlock)
|
||||
.anyMatch(b -> b instanceof FluidBlock))
|
||||
.anyMatch(FluidBlock.class::isInstance))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,6 @@ public final class InvWalkHack extends Hack implements UpdateListener
|
||||
private boolean hasTextBox(Screen screen)
|
||||
{
|
||||
return screen.children().stream()
|
||||
.anyMatch(e -> e instanceof TextFieldWidget);
|
||||
.anyMatch(TextFieldWidget.class::isInstance);
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public final class MobEspHack extends Hack implements UpdateListener,
|
||||
|
||||
Stream<MobEntity> stream =
|
||||
StreamSupport.stream(MC.world.getEntities().spliterator(), false)
|
||||
.filter(e -> e instanceof MobEntity).map(e -> (MobEntity)e)
|
||||
.filter(MobEntity.class::isInstance).map(e -> (MobEntity)e)
|
||||
.filter(e -> !e.isRemoved() && e.getHealth() > 0);
|
||||
|
||||
if(filterInvisible.isChecked())
|
||||
|
@ -119,7 +119,7 @@ public final class ProtectHack extends Hack
|
||||
{
|
||||
Stream<Entity> stream = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(
|
||||
e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
|
@ -92,7 +92,7 @@ public final class RadarHack extends Hack implements UpdateListener
|
||||
StreamSupport.stream(world.getEntities().spliterator(), true)
|
||||
.filter(e -> !e.isRemoved() && e != player)
|
||||
.filter(e -> !(e instanceof FakePlayerEntity))
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(e -> ((LivingEntity)e).getHealth() > 0);
|
||||
|
||||
stream = entityFilters.applyTo(stream);
|
||||
|
@ -54,7 +54,7 @@ public final class RemoteViewHack extends Hack
|
||||
{
|
||||
Stream<Entity> stream = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(
|
||||
e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
@ -127,7 +127,7 @@ public final class RemoteViewHack extends Hack
|
||||
{
|
||||
entity = StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), false)
|
||||
.filter(e -> e instanceof LivingEntity)
|
||||
.filter(LivingEntity.class::isInstance)
|
||||
.filter(
|
||||
e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
|
||||
.filter(e -> e != MC.player)
|
||||
|
@ -807,7 +807,7 @@ public final class TunnellerHack extends Hack
|
||||
// check for nearby falling blocks
|
||||
return StreamSupport
|
||||
.stream(MC.world.getEntities().spliterator(), false)
|
||||
.filter(e -> e instanceof FallingBlockEntity)
|
||||
.filter(FallingBlockEntity.class::isInstance)
|
||||
.anyMatch(e -> MC.player.squaredDistanceTo(e) < 36);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public enum EntityUtils
|
||||
public static Stream<AnimalEntity> getValidAnimals()
|
||||
{
|
||||
return StreamSupport.stream(MC.world.getEntities().spliterator(), true)
|
||||
.filter(e -> e instanceof AnimalEntity).map(e -> (AnimalEntity)e)
|
||||
.filter(AnimalEntity.class::isInstance).map(e -> (AnimalEntity)e)
|
||||
.filter(IS_VALID_ANIMAL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user