diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e53160eaac..ca9850e8e3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,8 +34,10 @@ jobs: - name: Execute Gradle build run: ./gradlew build - name: VirusTotal scan + if: github.event_name == 'push' uses: crazy-max/ghaction-virustotal@v4 with: vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }} files: | ./build/libs/*.jar + continue-on-error: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..d03ba0245c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,37 @@ +name: "Close stale issues and pull requests" +on: + schedule: + - cron: "30 1 * * 1-5" + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@main + with: + stale-issue-message: | + This issue has been open for a while with no recent activity. If this issue is still important to you, please add a comment within the next 7 days to keep it open. Otherwise, the issue will be automatically closed to free up time for other tasks. + + Issues should be closed if: + - They are duplicates of other issues + - There is not enough demand + - They are no longer relevant + - There are not enough details + stale-pr-message: | + This pull request has been open for a while with no recent activity. If you're still working on this or waiting for a review, please add a comment or commit within the next 7 days to keep it open. Otherwise, the pull request will be automatically closed to free up time for other tasks. + + Pull requests should be closed if: + - They have been superseded by another pull request + - They are out of scope or don't align with the project + - They have become obsolete due to other changes + - They have bugs or conflicts that won't be resolved + days-before-stale: 60 + days-before-close: 7 + stale-issue-label: "status:stale" + stale-pr-label: "status:stale" + operations-per-run: 30 + enable-statistics: true diff --git a/gradle.properties b/gradle.properties index d81309709f..7ee5f0e044 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version=0.14.24 fabric_version=0.90.4+1.20.1 # Mod Properties -mod_version = v7.37.1-MC1.20.1 +mod_version = v7.38-MC1.20.1 maven_group = net.wurstclient archives_base_name = Wurst-Client diff --git a/src/main/java/net/wurstclient/WurstClient.java b/src/main/java/net/wurstclient/WurstClient.java index 637652eb2f..c764effc5b 100644 --- a/src/main/java/net/wurstclient/WurstClient.java +++ b/src/main/java/net/wurstclient/WurstClient.java @@ -57,7 +57,7 @@ public enum WurstClient public static MinecraftClient MC; public static IMinecraftClient IMC; - public static final String VERSION = "7.37.1"; + public static final String VERSION = "7.38"; public static final String MC_VERSION = "1.20.1"; private WurstAnalytics analytics; diff --git a/src/main/java/net/wurstclient/commands/FollowCmd.java b/src/main/java/net/wurstclient/commands/FollowCmd.java index 77c25c769f..428bec8910 100644 --- a/src/main/java/net/wurstclient/commands/FollowCmd.java +++ b/src/main/java/net/wurstclient/commands/FollowCmd.java @@ -39,7 +39,7 @@ public void call(String[] args) throws CmdException 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)) diff --git a/src/main/java/net/wurstclient/commands/GoToCmd.java b/src/main/java/net/wurstclient/commands/GoToCmd.java index f42501a4cb..0dedc5cc50 100644 --- a/src/main/java/net/wurstclient/commands/GoToCmd.java +++ b/src/main/java/net/wurstclient/commands/GoToCmd.java @@ -89,7 +89,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError { 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)) diff --git a/src/main/java/net/wurstclient/commands/PathCmd.java b/src/main/java/net/wurstclient/commands/PathCmd.java index 71b5d5d49c..98a2570aa1 100644 --- a/src/main/java/net/wurstclient/commands/PathCmd.java +++ b/src/main/java/net/wurstclient/commands/PathCmd.java @@ -129,7 +129,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError { 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)) diff --git a/src/main/java/net/wurstclient/commands/ProtectCmd.java b/src/main/java/net/wurstclient/commands/ProtectCmd.java index 6a292b7c58..67e716cf7f 100644 --- a/src/main/java/net/wurstclient/commands/ProtectCmd.java +++ b/src/main/java/net/wurstclient/commands/ProtectCmd.java @@ -40,7 +40,7 @@ public void call(String[] args) throws CmdException 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)) diff --git a/src/main/java/net/wurstclient/commands/TpCmd.java b/src/main/java/net/wurstclient/commands/TpCmd.java index a99e7a72a3..d45a3fd4cf 100644 --- a/src/main/java/net/wurstclient/commands/TpCmd.java +++ b/src/main/java/net/wurstclient/commands/TpCmd.java @@ -67,7 +67,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError { 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)) diff --git a/src/main/java/net/wurstclient/hacks/AimAssistHack.java b/src/main/java/net/wurstclient/hacks/AimAssistHack.java index 3a60c7b17f..d8ab2f0592 100644 --- a/src/main/java/net/wurstclient/hacks/AimAssistHack.java +++ b/src/main/java/net/wurstclient/hacks/AimAssistHack.java @@ -15,14 +15,17 @@ import net.minecraft.entity.Entity; import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; import net.wurstclient.Category; import net.wurstclient.events.RenderListener; import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; +import net.wurstclient.settings.CheckboxSetting; import net.wurstclient.settings.SliderSetting; import net.wurstclient.settings.SliderSetting.ValueDisplay; import net.wurstclient.settings.filterlists.EntityFilterList; import net.wurstclient.settings.filters.*; +import net.wurstclient.util.BlockUtils; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RotationUtils; import net.wurstclient.util.RotationUtils.Rotation; @@ -42,18 +45,32 @@ public final class AimAssistHack extends Hack + "360\u00b0 = aims at entities all around you.", 120, 30, 360, 10, ValueDisplay.DEGREES); + private final CheckboxSetting checkLOS = new CheckboxSetting( + "Check line of sight", "Won't aim at entities behind blocks.", true); + private final EntityFilterList entityFilters = new EntityFilterList(FilterPlayersSetting.genericCombat(false), FilterSleepingSetting.genericCombat(false), FilterFlyingSetting.genericCombat(0), - FilterMonstersSetting.genericCombat(false), - FilterPigmenSetting.genericCombat(false), - FilterEndermenSetting.genericCombat(false), - FilterAnimalsSetting.genericCombat(true), + FilterHostileSetting.genericCombat(false), + FilterNeutralSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericCombat(true), + FilterPassiveWaterSetting.genericCombat(true), FilterBabiesSetting.genericCombat(true), + FilterBatsSetting.genericCombat(true), + FilterSlimesSetting.genericCombat(true), FilterPetsSetting.genericCombat(true), - FilterTradersSetting.genericCombat(true), + FilterVillagersSetting.genericCombat(true), + FilterZombieVillagersSetting.genericCombat(true), FilterGolemsSetting.genericCombat(false), + FilterPiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterEndermenSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericCombat(false), FilterInvisibleSetting.genericCombat(true), FilterNamedSetting.genericCombat(false), FilterShulkerBulletSetting.genericCombat(false), @@ -72,6 +89,7 @@ public AimAssistHack() addSetting(range); addSetting(rotationSpeed); addSetting(fov); + addSetting(checkLOS); entityFilters.forEach(this::addSetting); } @@ -87,7 +105,6 @@ protected void onEnable() WURST.getHax().killauraLegitHack.setEnabled(false); WURST.getHax().multiAuraHack.setEnabled(false); WURST.getHax().protectHack.setEnabled(false); - WURST.getHax().triggerBotHack.setEnabled(false); WURST.getHax().tpAuraHack.setEnabled(false); EVENTS.add(UpdateListener.class, this); @@ -126,6 +143,13 @@ public void onUpdate() if(target == null) return; + Vec3d hitVec = target.getBoundingBox().getCenter(); + if(checkLOS.isChecked() && !BlockUtils.hasLineOfSight(hitVec)) + { + target = null; + return; + } + WURST.getHax().autoSwordHack.setSlot(); faceEntityClient(target); } diff --git a/src/main/java/net/wurstclient/hacks/AnchorAuraHack.java b/src/main/java/net/wurstclient/hacks/AnchorAuraHack.java index 5eca0dc6c6..824fa6922c 100644 --- a/src/main/java/net/wurstclient/hacks/AnchorAuraHack.java +++ b/src/main/java/net/wurstclient/hacks/AnchorAuraHack.java @@ -20,13 +20,11 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.item.Items; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.UpdateListener; @@ -240,11 +238,8 @@ private boolean rightClickBlock(BlockPos pos) if(distanceSqHitVec >= distanceSqPosVec) continue; - if(checkLOS.isChecked() && MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; faceBlocks.getSelected().face(hitVec); @@ -284,11 +279,8 @@ private boolean placeAnchor(BlockPos pos) if(distanceSqPosVec > eyesPos.squaredDistanceTo(posVec.add(dirVec))) continue; - if(checkLOS.isChecked() && MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; InventoryUtils.selectItem(Items.RESPAWN_ANCHOR, diff --git a/src/main/java/net/wurstclient/hacks/AntiBlindHack.java b/src/main/java/net/wurstclient/hacks/AntiBlindHack.java index dc9ea4042c..fc76a3a2ff 100644 --- a/src/main/java/net/wurstclient/hacks/AntiBlindHack.java +++ b/src/main/java/net/wurstclient/hacks/AntiBlindHack.java @@ -23,5 +23,6 @@ public AntiBlindHack() setCategory(Category.RENDER); } - // See BackgroundRendererMixin, LightTextureManagerMixin, WorldRendererMixin + // See BackgroundRendererMixin, WorldRendererMixin, + // ClientPlayerEntityMixin.hasStatusEffect() } diff --git a/src/main/java/net/wurstclient/hacks/AutoBuildHack.java b/src/main/java/net/wurstclient/hacks/AutoBuildHack.java index 2347809ef7..021d196c74 100644 --- a/src/main/java/net/wurstclient/hacks/AutoBuildHack.java +++ b/src/main/java/net/wurstclient/hacks/AutoBuildHack.java @@ -26,7 +26,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.events.RenderListener; import net.wurstclient.events.RightClickListener; @@ -253,11 +252,8 @@ private boolean tryToPlace(BlockPos pos, Vec3d eyesPos, double rangeSq) continue; // check line of sight - if(checkLOS.isChecked() && MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; // face block diff --git a/src/main/java/net/wurstclient/hacks/AutoLibrarianHack.java b/src/main/java/net/wurstclient/hacks/AutoLibrarianHack.java index 3f2b82c01a..028452b484 100644 --- a/src/main/java/net/wurstclient/hacks/AutoLibrarianHack.java +++ b/src/main/java/net/wurstclient/hacks/AutoLibrarianHack.java @@ -452,7 +452,7 @@ private void setTargetVillager() Stream 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() diff --git a/src/main/java/net/wurstclient/hacks/BonemealAuraHack.java b/src/main/java/net/wurstclient/hacks/BonemealAuraHack.java index e9ad68df55..9939ee8178 100644 --- a/src/main/java/net/wurstclient/hacks/BonemealAuraHack.java +++ b/src/main/java/net/wurstclient/hacks/BonemealAuraHack.java @@ -18,11 +18,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.UpdateListener; @@ -244,11 +242,7 @@ private boolean rightClickBlockLegit(BlockPos pos) continue; // check line of sight - if(MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(!BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; // face block diff --git a/src/main/java/net/wurstclient/hacks/ChestEspHack.java b/src/main/java/net/wurstclient/hacks/ChestEspHack.java index cc2ec14d08..18b23871a0 100644 --- a/src/main/java/net/wurstclient/hacks/ChestEspHack.java +++ b/src/main/java/net/wurstclient/hacks/ChestEspHack.java @@ -192,7 +192,7 @@ else if(entity instanceof ChestBoatEntity) public void onCameraTransformViewBobbing( CameraTransformViewBobbingEvent event) { - if(style.getSelected().hasLines()) + if(style.hasLines()) event.cancel(); } @@ -211,16 +211,17 @@ public void onRender(MatrixStack matrixStack, float partialTicks) entityGroups.stream().filter(ChestEspGroup::isEnabled) .forEach(g -> g.updateBoxes(partialTicks)); - ChestEspRenderer espRenderer = new ChestEspRenderer(matrixStack); + ChestEspRenderer espRenderer = + new ChestEspRenderer(matrixStack, partialTicks); - if(style.getSelected().hasBoxes()) + if(style.hasBoxes()) { RenderSystem.setShader(GameRenderer::getPositionProgram); groups.stream().filter(ChestEspGroup::isEnabled) .forEach(espRenderer::renderBoxes); } - if(style.getSelected().hasLines()) + if(style.hasLines()) { RenderSystem.setShader(GameRenderer::getPositionProgram); groups.stream().filter(ChestEspGroup::isEnabled) diff --git a/src/main/java/net/wurstclient/hacks/CrystalAuraHack.java b/src/main/java/net/wurstclient/hacks/CrystalAuraHack.java index 5c96eefab7..28cb935353 100644 --- a/src/main/java/net/wurstclient/hacks/CrystalAuraHack.java +++ b/src/main/java/net/wurstclient/hacks/CrystalAuraHack.java @@ -21,12 +21,10 @@ import net.minecraft.entity.decoration.EndCrystalEntity; import net.minecraft.item.Items; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.UpdateListener; @@ -200,11 +198,8 @@ private boolean placeCrystal(BlockPos pos) if(distanceSqPosVec > eyesPos.squaredDistanceTo(posVec.add(dirVec))) continue; - if(checkLOS.isChecked() && MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; InventoryUtils.selectItem(Items.END_CRYSTAL, @@ -234,7 +229,7 @@ private ArrayList getNearbyCrystals() .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) diff --git a/src/main/java/net/wurstclient/hacks/DolphinHack.java b/src/main/java/net/wurstclient/hacks/DolphinHack.java index 66c0f617a0..d1dcf45dbb 100644 --- a/src/main/java/net/wurstclient/hacks/DolphinHack.java +++ b/src/main/java/net/wurstclient/hacks/DolphinHack.java @@ -40,7 +40,7 @@ public void onDisable() public void onUpdate() { ClientPlayerEntity player = MC.player; - if(!player.isWet() || player.isSneaking()) + if(!player.isTouchingWater() || player.isSneaking()) return; Vec3d velocity = player.getVelocity(); diff --git a/src/main/java/net/wurstclient/hacks/FishHack.java b/src/main/java/net/wurstclient/hacks/FishHack.java index ffc3ab423b..07e8b0d6f5 100644 --- a/src/main/java/net/wurstclient/hacks/FishHack.java +++ b/src/main/java/net/wurstclient/hacks/FishHack.java @@ -40,7 +40,7 @@ public void onDisable() public void onUpdate() { ClientPlayerEntity player = MC.player; - if(!player.isWet() || player.isSneaking()) + if(!player.isTouchingWater() || player.isSneaking()) return; Vec3d velocity = player.getVelocity(); diff --git a/src/main/java/net/wurstclient/hacks/FollowHack.java b/src/main/java/net/wurstclient/hacks/FollowHack.java index 3f58b33ab5..6a7ad57b19 100644 --- a/src/main/java/net/wurstclient/hacks/FollowHack.java +++ b/src/main/java/net/wurstclient/hacks/FollowHack.java @@ -150,7 +150,7 @@ public void onUpdate() { 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) diff --git a/src/main/java/net/wurstclient/hacks/FreecamHack.java b/src/main/java/net/wurstclient/hacks/FreecamHack.java index b16cc96865..dc3cd87ea5 100644 --- a/src/main/java/net/wurstclient/hacks/FreecamHack.java +++ b/src/main/java/net/wurstclient/hacks/FreecamHack.java @@ -206,7 +206,7 @@ public void onRender(MatrixStack matrixStack, float partialTicks) // line Vec3d regionVec = region.toVec3d(); - Vec3d start = RotationUtils.getClientLookVec() + Vec3d start = RotationUtils.getClientLookVec(partialTicks) .add(RenderUtils.getCameraPos()).subtract(regionVec); Vec3d end = fakePlayer.getBoundingBox().getCenter().subtract(regionVec); diff --git a/src/main/java/net/wurstclient/hacks/GlideHack.java b/src/main/java/net/wurstclient/hacks/GlideHack.java index 702bc641a3..8d797e9071 100644 --- a/src/main/java/net/wurstclient/hacks/GlideHack.java +++ b/src/main/java/net/wurstclient/hacks/GlideHack.java @@ -85,7 +85,7 @@ public void onUpdate() // 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; } diff --git a/src/main/java/net/wurstclient/hacks/InvWalkHack.java b/src/main/java/net/wurstclient/hacks/InvWalkHack.java index ebbafe43c7..5598b51f24 100644 --- a/src/main/java/net/wurstclient/hacks/InvWalkHack.java +++ b/src/main/java/net/wurstclient/hacks/InvWalkHack.java @@ -124,6 +124,6 @@ private boolean isCreativeSearchBarOpen(Screen screen) private boolean hasTextBox(Screen screen) { return screen.children().stream() - .anyMatch(e -> e instanceof TextFieldWidget); + .anyMatch(TextFieldWidget.class::isInstance); } } diff --git a/src/main/java/net/wurstclient/hacks/ItemEspHack.java b/src/main/java/net/wurstclient/hacks/ItemEspHack.java index b02bb3dea0..92a4abffe8 100644 --- a/src/main/java/net/wurstclient/hacks/ItemEspHack.java +++ b/src/main/java/net/wurstclient/hacks/ItemEspHack.java @@ -32,7 +32,7 @@ import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; import net.wurstclient.settings.ColorSetting; -import net.wurstclient.settings.EnumSetting; +import net.wurstclient.settings.EspBoxSizeSetting; import net.wurstclient.settings.EspStyleSetting; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RegionPos; @@ -45,10 +45,9 @@ public final class ItemEspHack extends Hack implements UpdateListener, { private final EspStyleSetting style = new EspStyleSetting(); - private final EnumSetting boxSize = new EnumSetting<>("Box size", + private final EspBoxSizeSetting boxSize = new EspBoxSizeSetting( "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each item.\n" - + "\u00a7lFancy\u00a7r mode shows larger boxes that look better.", - BoxSize.values(), BoxSize.FANCY); + + "\u00a7lFancy\u00a7r mode shows larger boxes that look better."); private final ColorSetting color = new ColorSetting("Color", "Items will be highlighted in this color.", Color.YELLOW); @@ -94,7 +93,7 @@ public void onUpdate() public void onCameraTransformViewBobbing( CameraTransformViewBobbingEvent event) { - if(style.getSelected().hasLines()) + if(style.hasLines()) event.cancel(); } @@ -111,7 +110,7 @@ public void onRender(MatrixStack matrixStack, float partialTicks) renderBoxes(matrixStack, partialTicks, region); - if(style.getSelected().hasLines()) + if(style.hasLines()) renderTracers(matrixStack, partialTicks, region); matrixStack.pop(); @@ -125,7 +124,7 @@ public void onRender(MatrixStack matrixStack, float partialTicks) private void renderBoxes(MatrixStack matrixStack, float partialTicks, RegionPos region) { - float extraSize = boxSize.getSelected().extraSize; + float extraSize = boxSize.getExtraSize(); for(ItemEntity e : items) { @@ -135,7 +134,7 @@ private void renderBoxes(MatrixStack matrixStack, float partialTicks, .subtract(region.toVec3d()); matrixStack.translate(lerpedPos.x, lerpedPos.y, lerpedPos.z); - if(style.getSelected().hasBoxes()) + if(style.hasBoxes()) { matrixStack.push(); matrixStack.scale(e.getWidth() + extraSize, @@ -170,7 +169,7 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, RenderSystem.setShader(GameRenderer::getPositionProgram); Vec3d regionVec = region.toVec3d(); - Vec3d start = RotationUtils.getClientLookVec() + Vec3d start = RotationUtils.getClientLookVec(partialTicks) .add(RenderUtils.getCameraPos()).subtract(regionVec); bufferBuilder.begin(VertexFormat.DrawMode.DEBUG_LINES, @@ -189,25 +188,4 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, } tessellator.draw(); } - - private enum BoxSize - { - ACCURATE("Accurate", 0), - FANCY("Fancy", 0.1F); - - private final String name; - private final float extraSize; - - private BoxSize(String name, float extraSize) - { - this.name = name; - this.extraSize = extraSize; - } - - @Override - public String toString() - { - return name; - } - } } diff --git a/src/main/java/net/wurstclient/hacks/KillauraHack.java b/src/main/java/net/wurstclient/hacks/KillauraHack.java index 3bb4ebabe5..b330c1c117 100644 --- a/src/main/java/net/wurstclient/hacks/KillauraHack.java +++ b/src/main/java/net/wurstclient/hacks/KillauraHack.java @@ -21,11 +21,9 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.PostMotionListener; @@ -39,6 +37,7 @@ import net.wurstclient.settings.SliderSetting; import net.wurstclient.settings.SliderSetting.ValueDisplay; import net.wurstclient.settings.filterlists.EntityFilterList; +import net.wurstclient.util.BlockUtils; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RegionPos; import net.wurstclient.util.RenderUtils; @@ -161,13 +160,8 @@ public void onUpdate() WURST.getHax().autoSwordHack.setSlot(); - Vec3d eyesPos = RotationUtils.getEyesPos(); Vec3d hitVec = target.getBoundingBox().getCenter(); - if(checkLOS.isChecked() && MC.world - .raycast(new RaycastContext(eyesPos, hitVec, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() != HitResult.Type.MISS) + if(checkLOS.isChecked() && !BlockUtils.hasLineOfSight(hitVec)) { target = null; return; diff --git a/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java b/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java index ca9ef20841..7572fefb3c 100644 --- a/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java +++ b/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java @@ -37,6 +37,7 @@ import net.wurstclient.settings.SliderSetting.ValueDisplay; import net.wurstclient.settings.filterlists.EntityFilterList; import net.wurstclient.settings.filters.*; +import net.wurstclient.util.BlockUtils; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RegionPos; import net.wurstclient.util.RenderUtils; @@ -78,14 +79,25 @@ public final class KillauraLegitHack extends Hack new EntityFilterList(FilterPlayersSetting.genericCombat(false), FilterSleepingSetting.genericCombat(true), FilterFlyingSetting.genericCombat(0.5), - FilterMonstersSetting.genericCombat(false), - FilterPigmenSetting.genericCombat(false), - FilterEndermenSetting.genericCombat(false), - FilterAnimalsSetting.genericCombat(false), + FilterHostileSetting.genericCombat(false), + FilterNeutralSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericCombat(false), + FilterPassiveWaterSetting.genericCombat(false), FilterBabiesSetting.genericCombat(false), + FilterBatsSetting.genericCombat(false), + FilterSlimesSetting.genericCombat(false), FilterPetsSetting.genericCombat(false), - FilterTradersSetting.genericCombat(false), + FilterVillagersSetting.genericCombat(false), + FilterZombieVillagersSetting.genericCombat(false), FilterGolemsSetting.genericCombat(false), + FilterPiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterEndermenSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericCombat(false), FilterAllaysSetting.genericCombat(false), FilterInvisibleSetting.genericCombat(true), FilterNamedSetting.genericCombat(false), @@ -168,6 +180,13 @@ public void onUpdate() WURST.getHax().autoSwordHack.setSlot(); + // check line of sight + if(!BlockUtils.hasLineOfSight(target.getBoundingBox().getCenter())) + { + target = null; + return; + } + // face entity if(!faceEntityClient(target)) return; diff --git a/src/main/java/net/wurstclient/hacks/MobEspHack.java b/src/main/java/net/wurstclient/hacks/MobEspHack.java index 83bd1affc1..6c33db3b8c 100644 --- a/src/main/java/net/wurstclient/hacks/MobEspHack.java +++ b/src/main/java/net/wurstclient/hacks/MobEspHack.java @@ -25,7 +25,8 @@ import net.minecraft.client.render.VertexFormat; import net.minecraft.client.render.VertexFormats; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.entity.mob.MobEntity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; @@ -35,9 +36,10 @@ import net.wurstclient.events.RenderListener; import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; -import net.wurstclient.settings.EnumSetting; +import net.wurstclient.settings.EspBoxSizeSetting; import net.wurstclient.settings.EspStyleSetting; -import net.wurstclient.settings.filters.FilterInvisibleSetting; +import net.wurstclient.settings.filterlists.EntityFilterList; +import net.wurstclient.settings.filters.*; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RegionPos; import net.wurstclient.util.RenderUtils; @@ -49,15 +51,34 @@ public final class MobEspHack extends Hack implements UpdateListener, { private final EspStyleSetting style = new EspStyleSetting(); - private final EnumSetting boxSize = new EnumSetting<>("Box size", + private final EspBoxSizeSetting boxSize = new EspBoxSizeSetting( "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each mob.\n" - + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better.", - BoxSize.values(), BoxSize.FANCY); + + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better."); - private final FilterInvisibleSetting filterInvisible = - new FilterInvisibleSetting("Won't show invisible mobs.", false); + private final EntityFilterList entityFilters = + new EntityFilterList(FilterHostileSetting.genericVision(false), + FilterNeutralSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericVision(false), + FilterPassiveWaterSetting.genericVision(false), + FilterBatsSetting.genericVision(false), + FilterSlimesSetting.genericVision(false), + FilterPetsSetting.genericVision(false), + FilterVillagersSetting.genericVision(false), + FilterZombieVillagersSetting.genericVision(false), + FilterGolemsSetting.genericVision(false), + FilterPiglinsSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterEndermenSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericVision(false), + FilterAllaysSetting.genericVision(false), + FilterInvisibleSetting.genericVision(false), + FilterArmorStandsSetting.genericVision(true)); - private final ArrayList mobs = new ArrayList<>(); + private final ArrayList mobs = new ArrayList<>(); private VertexBuffer mobBox; public MobEspHack() @@ -66,7 +87,7 @@ public MobEspHack() setCategory(Category.RENDER); addSetting(style); addSetting(boxSize); - addSetting(filterInvisible); + entityFilters.forEach(this::addSetting); } @Override @@ -97,13 +118,13 @@ public void onUpdate() { mobs.clear(); - Stream stream = - StreamSupport.stream(MC.world.getEntities().spliterator(), false) - .filter(e -> e instanceof MobEntity).map(e -> (MobEntity)e) - .filter(e -> !e.isRemoved() && e.getHealth() > 0); + Stream stream = StreamSupport + .stream(MC.world.getEntities().spliterator(), false) + .filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e) + .filter(e -> !(e instanceof PlayerEntity)) + .filter(e -> !e.isRemoved() && e.getHealth() > 0); - if(filterInvisible.isChecked()) - stream = stream.filter(filterInvisible); + stream = entityFilters.applyTo(stream); mobs.addAll(stream.collect(Collectors.toList())); } @@ -112,7 +133,7 @@ public void onUpdate() public void onCameraTransformViewBobbing( CameraTransformViewBobbingEvent event) { - if(style.getSelected().hasLines()) + if(style.hasLines()) event.cancel(); } @@ -129,10 +150,10 @@ public void onRender(MatrixStack matrixStack, float partialTicks) RegionPos region = RenderUtils.getCameraRegion(); RenderUtils.applyRegionalRenderOffset(matrixStack, region); - if(style.getSelected().hasBoxes()) + if(style.hasBoxes()) renderBoxes(matrixStack, partialTicks, region); - if(style.getSelected().hasLines()) + if(style.hasLines()) renderTracers(matrixStack, partialTicks, region); matrixStack.pop(); @@ -146,10 +167,10 @@ public void onRender(MatrixStack matrixStack, float partialTicks) private void renderBoxes(MatrixStack matrixStack, float partialTicks, RegionPos region) { - float extraSize = boxSize.getSelected().extraSize; + float extraSize = boxSize.getExtraSize(); RenderSystem.setShader(GameRenderer::getPositionProgram); - for(MobEntity e : mobs) + for(LivingEntity e : mobs) { matrixStack.push(); @@ -163,11 +184,11 @@ private void renderBoxes(MatrixStack matrixStack, float partialTicks, float f = MC.player.distanceTo(e) / 20F; RenderSystem.setShaderColor(2 - f, f, 0, 0.5F); + Matrix4f viewMatrix = matrixStack.peek().getPositionMatrix(); + Matrix4f projMatrix = RenderSystem.getProjectionMatrix(); ShaderProgram shader = RenderSystem.getShader(); - Matrix4f matrix4f = RenderSystem.getProjectionMatrix(); mobBox.bind(); - mobBox.draw(matrixStack.peek().getPositionMatrix(), matrix4f, - shader); + mobBox.draw(viewMatrix, projMatrix, shader); VertexBuffer.unbind(); matrixStack.pop(); @@ -188,10 +209,10 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, VertexFormats.POSITION_COLOR); Vec3d regionVec = region.toVec3d(); - Vec3d start = RotationUtils.getClientLookVec() + Vec3d start = RotationUtils.getClientLookVec(partialTicks) .add(RenderUtils.getCameraPos()).subtract(regionVec); - for(MobEntity e : mobs) + for(LivingEntity e : mobs) { Vec3d end = EntityUtils.getLerpedBox(e, partialTicks).getCenter() .subtract(regionVec); @@ -210,27 +231,5 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, } tessellator.draw(); - - } - - private enum BoxSize - { - ACCURATE("Accurate", 0), - FANCY("Fancy", 0.1F); - - private final String name; - private final float extraSize; - - private BoxSize(String name, float extraSize) - { - this.name = name; - this.extraSize = extraSize; - } - - @Override - public String toString() - { - return name; - } } } diff --git a/src/main/java/net/wurstclient/hacks/PlayerEspHack.java b/src/main/java/net/wurstclient/hacks/PlayerEspHack.java index 9d5d4f2498..a44a5d2e1c 100644 --- a/src/main/java/net/wurstclient/hacks/PlayerEspHack.java +++ b/src/main/java/net/wurstclient/hacks/PlayerEspHack.java @@ -34,7 +34,7 @@ import net.wurstclient.events.RenderListener; import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; -import net.wurstclient.settings.EnumSetting; +import net.wurstclient.settings.EspBoxSizeSetting; import net.wurstclient.settings.EspStyleSetting; import net.wurstclient.settings.EspStyleSetting.EspStyle; import net.wurstclient.settings.filterlists.EntityFilterList; @@ -53,10 +53,9 @@ public final class PlayerEspHack extends Hack implements UpdateListener, private final EspStyleSetting style = new EspStyleSetting(EspStyle.LINES_AND_BOXES); - private final EnumSetting boxSize = new EnumSetting<>("Box size", + private final EspBoxSizeSetting boxSize = new EspBoxSizeSetting( "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each player.\n" - + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better.", - BoxSize.values(), BoxSize.FANCY); + + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better."); private final EntityFilterList entityFilters = new EntityFilterList( new FilterSleepingSetting("Won't show sleeping players.", false), @@ -112,7 +111,7 @@ public void onUpdate() public void onCameraTransformViewBobbing( CameraTransformViewBobbingEvent event) { - if(style.getSelected().hasLines()) + if(style.hasLines()) event.cancel(); } @@ -130,10 +129,10 @@ public void onRender(MatrixStack matrixStack, float partialTicks) RenderUtils.applyRegionalRenderOffset(matrixStack, region); // draw boxes - if(style.getSelected().hasBoxes()) + if(style.hasBoxes()) renderBoxes(matrixStack, partialTicks, region); - if(style.getSelected().hasLines()) + if(style.hasLines()) renderTracers(matrixStack, partialTicks, region); matrixStack.pop(); @@ -147,7 +146,7 @@ public void onRender(MatrixStack matrixStack, float partialTicks) private void renderBoxes(MatrixStack matrixStack, float partialTicks, RegionPos region) { - float extraSize = boxSize.getSelected().extraSize; + float extraSize = boxSize.getExtraSize(); for(PlayerEntity e : players) { @@ -190,7 +189,7 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, VertexFormats.POSITION_COLOR); Vec3d regionVec = region.toVec3d(); - Vec3d start = RotationUtils.getClientLookVec() + Vec3d start = RotationUtils.getClientLookVec(partialTicks) .add(RenderUtils.getCameraPos()).subtract(regionVec); for(PlayerEntity e : players) @@ -225,25 +224,4 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, tessellator.draw(); } - - private enum BoxSize - { - ACCURATE("Accurate", 0), - FANCY("Fancy", 0.1F); - - private final String name; - private final float extraSize; - - private BoxSize(String name, float extraSize) - { - this.name = name; - this.extraSize = extraSize; - } - - @Override - public String toString() - { - return name; - } - } } diff --git a/src/main/java/net/wurstclient/hacks/ProtectHack.java b/src/main/java/net/wurstclient/hacks/ProtectHack.java index b65df1ee83..0d79a46a30 100644 --- a/src/main/java/net/wurstclient/hacks/ProtectHack.java +++ b/src/main/java/net/wurstclient/hacks/ProtectHack.java @@ -52,14 +52,25 @@ public final class ProtectHack extends Hack new EntityFilterList(FilterPlayersSetting.genericCombat(false), FilterSleepingSetting.genericCombat(false), FilterFlyingSetting.genericCombat(0), - FilterMonstersSetting.genericCombat(false), - FilterPigmenSetting.genericCombat(false), - FilterEndermenSetting.genericCombat(false), - FilterAnimalsSetting.genericCombat(false), + FilterHostileSetting.genericCombat(false), + FilterNeutralSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericCombat(false), + FilterPassiveWaterSetting.genericCombat(false), FilterBabiesSetting.genericCombat(false), + FilterBatsSetting.genericCombat(false), + FilterSlimesSetting.genericCombat(false), FilterPetsSetting.genericCombat(false), - FilterTradersSetting.genericCombat(false), + FilterVillagersSetting.genericCombat(false), + FilterZombieVillagersSetting.genericCombat(false), FilterGolemsSetting.genericCombat(false), + FilterPiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericCombat(FilterZombiePiglinsSetting.Mode.OFF), + FilterEndermenSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericCombat(false), FilterAllaysSetting.genericCombat(false), FilterInvisibleSetting.genericCombat(false), FilterNamedSetting.genericCombat(false), @@ -119,7 +130,7 @@ public void onEnable() { Stream 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) diff --git a/src/main/java/net/wurstclient/hacks/RadarHack.java b/src/main/java/net/wurstclient/hacks/RadarHack.java index cbaa477232..e08270fb14 100644 --- a/src/main/java/net/wurstclient/hacks/RadarHack.java +++ b/src/main/java/net/wurstclient/hacks/RadarHack.java @@ -27,11 +27,7 @@ import net.wurstclient.settings.SliderSetting; import net.wurstclient.settings.SliderSetting.ValueDisplay; import net.wurstclient.settings.filterlists.EntityFilterList; -import net.wurstclient.settings.filters.FilterAnimalsSetting; -import net.wurstclient.settings.filters.FilterInvisibleSetting; -import net.wurstclient.settings.filters.FilterMonstersSetting; -import net.wurstclient.settings.filters.FilterPlayersSetting; -import net.wurstclient.settings.filters.FilterSleepingSetting; +import net.wurstclient.settings.filters.*; import net.wurstclient.util.FakePlayerEntity; @SearchTags({"MiniMap", "mini map"}) @@ -45,12 +41,15 @@ public final class RadarHack extends Hack implements UpdateListener private final CheckboxSetting rotate = new CheckboxSetting("Rotate with player", true); - private final EntityFilterList entityFilters = new EntityFilterList( - new FilterPlayersSetting("Won't show other players.", false), - new FilterSleepingSetting("Won't show sleeping players.", false), - new FilterMonstersSetting("Won't show zombies, creepers, etc.", false), - new FilterAnimalsSetting("Won't show pigs, cows, etc.", false), - new FilterInvisibleSetting("Won't show invisible entities.", false)); + private final EntityFilterList entityFilters = + new EntityFilterList(FilterPlayersSetting.genericVision(false), + FilterSleepingSetting.genericVision(false), + FilterHostileSetting.genericVision(false), + FilterPassiveSetting.genericVision(false), + FilterPassiveWaterSetting.genericVision(false), + FilterBatsSetting.genericVision(true), + FilterSlimesSetting.genericVision(false), + FilterInvisibleSetting.genericVision(false)); public RadarHack() { @@ -92,7 +91,7 @@ public void onUpdate() 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); diff --git a/src/main/java/net/wurstclient/hacks/RemoteViewHack.java b/src/main/java/net/wurstclient/hacks/RemoteViewHack.java index bf0154bbf0..f47320c48d 100644 --- a/src/main/java/net/wurstclient/hacks/RemoteViewHack.java +++ b/src/main/java/net/wurstclient/hacks/RemoteViewHack.java @@ -54,7 +54,7 @@ public void onEnable() { Stream 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 void onToggledByCommand(String viewName) { 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) diff --git a/src/main/java/net/wurstclient/hacks/TillauraHack.java b/src/main/java/net/wurstclient/hacks/TillauraHack.java index 7be585e969..8650dfcb28 100644 --- a/src/main/java/net/wurstclient/hacks/TillauraHack.java +++ b/src/main/java/net/wurstclient/hacks/TillauraHack.java @@ -19,13 +19,9 @@ import net.minecraft.item.HoeItem; import net.minecraft.item.ItemStack; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; -import net.minecraft.world.RaycastContext.FluidHandling; -import net.minecraft.world.RaycastContext.ShapeType; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.UpdateListener; @@ -165,7 +161,8 @@ private boolean rightClickBlockLegit(BlockPos pos) if(distanceSqHitVec >= distanceSqPosVec) continue; - if(checkLOS.isChecked() && !hasLineOfSight(eyesPos, hitVec)) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; // face block @@ -201,7 +198,8 @@ private boolean rightClickBlockSimple(BlockPos pos) if(distanceSqHitVec >= distanceSqPosVec) continue; - if(checkLOS.isChecked() && !hasLineOfSight(eyesPos, hitVec)) + if(checkLOS.isChecked() + && !BlockUtils.hasLineOfSight(eyesPos, hitVec)) continue; IMC.getInteractionManager().rightClickBlock(pos, side, hitVec); @@ -210,15 +208,4 @@ private boolean rightClickBlockSimple(BlockPos pos) return false; } - - private boolean hasLineOfSight(Vec3d from, Vec3d to) - { - ShapeType type = RaycastContext.ShapeType.COLLIDER; - FluidHandling fluid = RaycastContext.FluidHandling.NONE; - - RaycastContext context = - new RaycastContext(from, to, type, fluid, MC.player); - - return MC.world.raycast(context).getType() == HitResult.Type.MISS; - } } diff --git a/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java b/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java index b9b821e047..4d910d9332 100644 --- a/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java +++ b/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java @@ -33,12 +33,12 @@ import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.Box; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.SearchTags; import net.wurstclient.events.RenderListener; import net.wurstclient.hack.Hack; import net.wurstclient.settings.ColorSetting; +import net.wurstclient.util.BlockUtils; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RenderUtils; import net.wurstclient.util.RotationUtils; @@ -216,10 +216,7 @@ private Trajectory getTrajectory(float partialTicks) : RotationUtils.getEyesPos(); // check for block collision - BlockHitResult bResult = - MC.world.raycast(new RaycastContext(lastPos, arrowPos, - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)); + BlockHitResult bResult = BlockUtils.raycast(lastPos, arrowPos); if(bResult.getType() != HitResult.Type.MISS) { // replace last pos with the collision point diff --git a/src/main/java/net/wurstclient/hacks/TunnellerHack.java b/src/main/java/net/wurstclient/hacks/TunnellerHack.java index d061275ab3..3e97cbddf0 100644 --- a/src/main/java/net/wurstclient/hacks/TunnellerHack.java +++ b/src/main/java/net/wurstclient/hacks/TunnellerHack.java @@ -39,7 +39,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.network.packet.c2s.play.HandSwingC2SPacket; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; @@ -47,7 +46,6 @@ import net.minecraft.util.math.Vec3i; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.EmptyBlockView; -import net.minecraft.world.RaycastContext; import net.wurstclient.Category; import net.wurstclient.events.RenderListener; import net.wurstclient.events.UpdateListener; @@ -807,7 +805,7 @@ public boolean canRun() // 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); } @@ -923,7 +921,7 @@ private boolean breakBlock(BlockPos pos) if(distancesSq[i] >= distanceSqToCenter) continue; - linesOfSight[i] = hasLineOfSight(eyesPos, hitVecs[i]); + linesOfSight[i] = BlockUtils.hasLineOfSight(eyesPos, hitVecs[i]); } Direction side = sides[0]; @@ -957,15 +955,6 @@ private boolean breakBlock(BlockPos pos) return true; } - private boolean hasLineOfSight(Vec3d from, Vec3d to) - { - RaycastContext context = - new RaycastContext(from, to, RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player); - - return MC.world.raycast(context).getType() == HitResult.Type.MISS; - } - private enum TunnelSize { SIZE_1X2("1x2", new Vec3i(0, 1, 0), new Vec3i(0, 0, 0), 4, 13), diff --git a/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java b/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java index b04f568bf5..ed0ade7aa8 100644 --- a/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java +++ b/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java @@ -37,12 +37,12 @@ public final class ChestEspRenderer private final RegionPos region; private final Vec3d start; - public ChestEspRenderer(MatrixStack matrixStack) + public ChestEspRenderer(MatrixStack matrixStack, float partialTicks) { this.matrixStack = matrixStack; region = RenderUtils.getCameraRegion(); - start = RotationUtils.getClientLookVec().add(RenderUtils.getCameraPos()) - .subtract(region.toVec3d()); + start = RotationUtils.getClientLookVec(partialTicks) + .add(RenderUtils.getCameraPos()).subtract(region.toVec3d()); } public void renderBoxes(ChestEspGroup group) diff --git a/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java b/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java index 38e5a130e1..55aeac4e8c 100644 --- a/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java +++ b/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java @@ -270,6 +270,9 @@ public boolean hasStatusEffect(StatusEffect effect) && hax.noLevitationHack.isEnabled()) return false; + if(effect == StatusEffects.DARKNESS && hax.antiBlindHack.isEnabled()) + return false; + return super.hasStatusEffect(effect); } } diff --git a/src/main/java/net/wurstclient/mixin/LightTextureManagerMixin.java b/src/main/java/net/wurstclient/mixin/LightTextureManagerMixin.java deleted file mode 100644 index 684e118239..0000000000 --- a/src/main/java/net/wurstclient/mixin/LightTextureManagerMixin.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.mixin; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import net.minecraft.client.render.LightmapTextureManager; -import net.wurstclient.WurstClient; - -@Mixin(LightmapTextureManager.class) -public class LightTextureManagerMixin -{ - @Inject(at = @At("HEAD"), - method = "getDarknessFactor(F)F", - cancellable = true) - private void onGetDarknessFactor(float delta, - CallbackInfoReturnable ci) - { - if(WurstClient.INSTANCE.getHax().antiBlindHack.isEnabled()) - ci.setReturnValue(0F); - } -} diff --git a/src/main/java/net/wurstclient/settings/EspBoxSizeSetting.java b/src/main/java/net/wurstclient/settings/EspBoxSizeSetting.java new file mode 100644 index 0000000000..dce32108bf --- /dev/null +++ b/src/main/java/net/wurstclient/settings/EspBoxSizeSetting.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings; + +public final class EspBoxSizeSetting + extends EnumSetting +{ + public EspBoxSizeSetting(String description) + { + super("Box size", description, BoxSize.values(), BoxSize.FANCY); + } + + public EspBoxSizeSetting(String name, String description, BoxSize selected) + { + super(name, description, BoxSize.values(), selected); + } + + public float getExtraSize() + { + return getSelected().extraSize; + } + + public enum BoxSize + { + ACCURATE("Accurate", 0), + FANCY("Fancy", 0.1F); + + private final String name; + private final float extraSize; + + private BoxSize(String name, float extraSize) + { + this.name = name; + this.extraSize = extraSize; + } + + public float getExtraSize() + { + return extraSize; + } + + @Override + public String toString() + { + return name; + } + } +} diff --git a/src/main/java/net/wurstclient/settings/EspStyleSetting.java b/src/main/java/net/wurstclient/settings/EspStyleSetting.java index 73dd64b9b4..f06da31b22 100644 --- a/src/main/java/net/wurstclient/settings/EspStyleSetting.java +++ b/src/main/java/net/wurstclient/settings/EspStyleSetting.java @@ -24,6 +24,16 @@ public EspStyleSetting(String name, String description, EspStyle selected) super(name, description, EspStyle.values(), selected); } + public boolean hasBoxes() + { + return getSelected().boxes; + } + + public boolean hasLines() + { + return getSelected().lines; + } + public enum EspStyle { BOXES("Boxes only", true, false), diff --git a/src/main/java/net/wurstclient/settings/filterlists/AnchorAuraFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/AnchorAuraFilterList.java index 71a02391bb..0506b0576c 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/AnchorAuraFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/AnchorAuraFilterList.java @@ -30,26 +30,51 @@ public static AnchorAuraFilterList create() + damageWarning, false)); - builder.add(new FilterMonstersSetting( - "Won't target zombies, creepers, etc. when auto-placing anchors." - + damageWarning, - true)); + builder.add(new FilterHostileSetting("Won't target hostile mobs like" + + " zombies and creepers when auto-placing anchors." + + damageWarning, true)); - builder.add(new FilterAnimalsSetting( - "Won't target pigs, cows, etc. when auto-placing anchors." - + damageWarning, + builder.add(new FilterNeutralSetting("Won't target neutral mobs like" + + " endermen and wolves when auto-placing anchors." + damageWarning, + AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterPassiveSetting("Won't target animals like pigs" + + " and cows, ambient mobs like bats, and water mobs like fish," + + " squid and dolphins when auto-placing anchors." + damageWarning, true)); - builder.add(new FilterTradersSetting( - "Won't target villagers, wandering traders, etc. when auto-placing anchors." - + damageWarning, + builder.add(new FilterPassiveWaterSetting("Won't target passive water" + + " mobs like fish, squid, dolphins and axolotls when auto-placing" + + " anchors." + damageWarning, true)); + + builder.add(new FilterBatsSetting("Won't target bats and any other" + + " \"ambient\" mobs when auto-placing anchors." + damageWarning, true)); - builder.add(new FilterGolemsSetting( - "Won't target iron golems, snow golems and shulkers when auto-placing anchors." - + damageWarning, + builder.add(new FilterSlimesSetting("Won't target slimes when" + + " auto-placing anchors." + damageWarning, true)); + + builder.add(new FilterVillagersSetting("Won't target villagers and" + + " wandering traders when auto-placing anchors." + damageWarning, true)); + builder.add(new FilterZombieVillagersSetting("Won't target zombified" + + " villagers when auto-placing anchors." + damageWarning, true)); + + builder.add(new FilterGolemsSetting("Won't target iron golems and snow" + + " golems when auto-placing anchors." + damageWarning, true)); + + builder.add(new FilterPiglinsSetting( + "Won't target piglins when auto-placing anchors.", + AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterZombiePiglinsSetting("Won't target" + + " zombified piglins when auto-placing anchors." + damageWarning, + AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterShulkersSetting("Won't target shulkers when" + + " auto-placing anchors." + damageWarning, true)); + builder.add(new FilterAllaysSetting( "Won't target allays when auto-placing anchors." + damageWarning, true)); diff --git a/src/main/java/net/wurstclient/settings/filterlists/CrystalAuraFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/CrystalAuraFilterList.java index 754f8d596e..993c5dd853 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/CrystalAuraFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/CrystalAuraFilterList.java @@ -30,26 +30,51 @@ public static CrystalAuraFilterList create() + damageWarning, false)); - builder.add(new FilterMonstersSetting( - "Won't target zombies, creepers, etc. when auto-placing crystals." - + damageWarning, - true)); + builder.add(new FilterHostileSetting("Won't target hostile mobs like" + + " zombies and creepers when auto-placing crystals." + + damageWarning, true)); - builder.add(new FilterAnimalsSetting( - "Won't target pigs, cows, etc. when auto-placing crystals." - + damageWarning, + builder.add(new FilterNeutralSetting("Won't target neutral mobs like" + + " endermen and wolves when auto-placing crystals." + + damageWarning, AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterPassiveSetting("Won't target animals like pigs" + + " and cows, ambient mobs like bats, and water mobs like fish," + + " squid and dolphins when auto-placing crystals." + damageWarning, true)); - builder.add(new FilterTradersSetting( - "Won't target villagers, wandering traders, etc. when auto-placing crystals." - + damageWarning, + builder.add(new FilterPassiveWaterSetting("Won't target passive water" + + " mobs like fish, squid, dolphins and axolotls when auto-placing" + + " crystals." + damageWarning, true)); + + builder.add(new FilterBatsSetting("Won't target bats and any other" + + " \"ambient\" mobs when auto-placing crystals." + damageWarning, true)); - builder.add(new FilterGolemsSetting( - "Won't target iron golems, snow golems and shulkers when auto-placing crystals." - + damageWarning, + builder.add(new FilterSlimesSetting("Won't target slimes when" + + " auto-placing crystals." + damageWarning, true)); + + builder.add(new FilterVillagersSetting("Won't target villagers and" + + " wandering traders when auto-placing crystals." + damageWarning, true)); + builder.add(new FilterZombieVillagersSetting("Won't target zombified" + + " villagers when auto-placing crystals." + damageWarning, true)); + + builder.add(new FilterGolemsSetting("Won't target iron golems and snow" + + " golems when auto-placing crystals." + damageWarning, true)); + + builder.add(new FilterPiglinsSetting("Won't target piglins when" + + " auto-placing crystals." + damageWarning, + AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterZombiePiglinsSetting("Won't target" + + " zombified piglins when auto-placing crystals." + damageWarning, + AttackDetectingEntityFilter.Mode.ON)); + + builder.add(new FilterShulkersSetting("Won't target shulkers when" + + " auto-placing crystals." + damageWarning, true)); + builder.add(new FilterAllaysSetting( "Won't target allays when auto-placing crystals." + damageWarning, true)); diff --git a/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java index 8077a407f1..3491fe30cc 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java @@ -55,14 +55,25 @@ public static EntityFilterList genericCombat() return new EntityFilterList(FilterPlayersSetting.genericCombat(false), FilterSleepingSetting.genericCombat(false), FilterFlyingSetting.genericCombat(0), - FilterMonstersSetting.genericCombat(false), - FilterPigmenSetting.genericCombat(false), - FilterEndermenSetting.genericCombat(false), - FilterAnimalsSetting.genericCombat(false), + FilterHostileSetting.genericCombat(false), + FilterNeutralSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericCombat(false), + FilterPassiveWaterSetting.genericCombat(false), FilterBabiesSetting.genericCombat(false), + FilterBatsSetting.genericCombat(false), + FilterSlimesSetting.genericCombat(false), FilterPetsSetting.genericCombat(false), - FilterTradersSetting.genericCombat(false), + FilterVillagersSetting.genericCombat(false), + FilterZombieVillagersSetting.genericCombat(false), FilterGolemsSetting.genericCombat(false), + FilterPiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterEndermenSetting + .genericCombat(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericCombat(false), FilterAllaysSetting.genericCombat(false), FilterInvisibleSetting.genericCombat(false), FilterNamedSetting.genericCombat(false), diff --git a/src/main/java/net/wurstclient/settings/filterlists/FollowFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/FollowFilterList.java index e6feb12926..2a834efd60 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/FollowFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/FollowFilterList.java @@ -33,28 +33,49 @@ public static FollowFilterList create() "Won't follow players that are at least the given distance above ground.", 0)); - builder.add(new FilterMonstersSetting( - "Won't follow zombies, creepers, etc.", true)); + builder.add(new FilterHostileSetting( + "Won't follow hostile mobs like zombies and creepers.", true)); - builder - .add(new FilterPigmenSetting("Won't follow zombie pigmen.", true)); + builder.add(FilterNeutralSetting.onOffOnly( + "Won't follow neutral mobs like endermen and wolves.", true)); - builder.add(new FilterEndermenSetting("Won't follow endermen.", true)); + builder.add(new FilterPassiveSetting("Won't follow animals like pigs" + + " and cows, ambient mobs like bats, and water mobs like" + + " fish, squid and dolphins.", true)); - builder.add( - new FilterAnimalsSetting("Won't follow pigs, cows, etc.", true)); + builder.add(new FilterPassiveWaterSetting("Won't follow passive water" + + " mobs like fish, squid, dolphins and axolotls.", true)); builder.add(new FilterBabiesSetting( "Won't follow baby pigs, baby villagers, etc.", true)); + builder.add(new FilterBatsSetting("Won't follow bats and any other" + + " \"ambient\" mobs that might be added by mods.", true)); + + builder.add(new FilterSlimesSetting("Won't follow slimes.", true)); + builder.add(new FilterPetsSetting( "Won't follow tamed wolves, tamed horses, etc.", true)); - builder.add(new FilterTradersSetting( - "Won't follow villagers, wandering traders, etc.", true)); + builder.add(new FilterVillagersSetting( + "Won't follow villagers and wandering traders.", true)); + + builder.add(new FilterZombieVillagersSetting( + "Won't follow zombified villagers.", true)); builder.add(new FilterGolemsSetting( - "Won't follow iron golems, snow golems and shulkers.", true)); + "Won't follow iron golems and snow golems.", true)); + + builder + .add(FilterPiglinsSetting.onOffOnly("Won't follow piglins.", true)); + + builder.add(FilterZombiePiglinsSetting + .onOffOnly("Won't follow zombified piglins.", true)); + + builder.add( + FilterEndermenSetting.onOffOnly("Won't follow endermen.", true)); + + builder.add(new FilterShulkersSetting("Won't follow shulkers.", true)); builder.add(new FilterAllaysSetting("Won't follow allays.", true)); diff --git a/src/main/java/net/wurstclient/settings/filterlists/RemoteViewFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/RemoteViewFilterList.java index 882921458c..ac0e0bbdd6 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/RemoteViewFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/RemoteViewFilterList.java @@ -33,27 +33,49 @@ public static RemoteViewFilterList create() "Won't view players that are at least the given distance above ground.", 0)); - builder.add(new FilterMonstersSetting( - "Won't view zombies, creepers, etc.", true)); + builder.add(new FilterHostileSetting( + "Won't view hostile mobs like zombies and creepers.", true)); - builder.add(new FilterPigmenSetting("Won't view zombie pigmen.", true)); + builder.add(FilterNeutralSetting.onOffOnly( + "Won't view neutral mobs like endermen and wolves.", true)); - builder.add(new FilterEndermenSetting("Won't view endermen.", true)); + builder.add(new FilterPassiveSetting("Won't view animals like pigs and" + + " cows, ambient mobs like bats, and water mobs like fish, squid" + + " and dolphins.", true)); - builder - .add(new FilterAnimalsSetting("Won't view pigs, cows, etc.", true)); + builder.add(new FilterPassiveWaterSetting("Won't view passive water" + + " mobs like fish, squid, dolphins and axolotls.", true)); builder.add(new FilterBabiesSetting( "Won't view baby pigs, baby villagers, etc.", true)); + builder.add(new FilterBatsSetting("Won't view bats and any other" + + " \"ambient\" mobs that might be added by mods.", true)); + + builder.add(new FilterSlimesSetting("Won't view slimes.", true)); + builder.add(new FilterPetsSetting( "Won't view tamed wolves, tamed horses, etc.", true)); - builder.add(new FilterTradersSetting( - "Won't view villagers, wandering traders, etc.", true)); + builder.add(new FilterVillagersSetting( + "Won't view villagers and wandering traders.", true)); + + builder.add(new FilterZombieVillagersSetting( + "Won't view zombified villagers.", true)); builder.add(new FilterGolemsSetting( - "Won't view iron golems, snow golems and shulkers.", true)); + "Won't view iron golems and snow golems.", true)); + + builder + .add(FilterPiglinsSetting.onOffOnly("Won't view piglins.", true)); + + builder.add(FilterZombiePiglinsSetting + .onOffOnly("Won't view zombified piglins.", true)); + + builder + .add(FilterEndermenSetting.onOffOnly("Won't view endermen.", true)); + + builder.add(new FilterShulkersSetting("Won't view shulkers.", true)); builder.add(new FilterAllaysSetting("Won't view allays.", true)); diff --git a/src/main/java/net/wurstclient/settings/filters/AttackDetectingEntityFilter.java b/src/main/java/net/wurstclient/settings/filters/AttackDetectingEntityFilter.java new file mode 100644 index 0000000000..96f0426e3f --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/AttackDetectingEntityFilter.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import java.util.function.Supplier; + +import net.minecraft.entity.Entity; +import net.wurstclient.settings.CheckboxSetting; +import net.wurstclient.settings.EnumSetting; +import net.wurstclient.settings.Setting; +import net.wurstclient.settings.filterlists.EntityFilterList.EntityFilter; + +public abstract class AttackDetectingEntityFilter implements EntityFilter +{ + private final Setting setting; + private final Supplier mode; + + protected AttackDetectingEntityFilter(String name, String description, + Mode selected, boolean checked) + { + if(selected == null) + { + CheckboxSetting cbSetting = + new CheckboxSetting(name, description, checked); + setting = cbSetting; + mode = () -> cbSetting.isChecked() ? Mode.ON : Mode.OFF; + + }else + { + EnumSetting enumSetting = + new EnumSetting<>(name, description, Mode.values(), selected); + setting = enumSetting; + mode = () -> enumSetting.getSelected(); + } + } + + public abstract boolean onTest(Entity e); + + public abstract boolean ifCalmTest(Entity e); + + @Override + public final boolean test(Entity e) + { + return mode.get() == Mode.IF_CALM ? ifCalmTest(e) : onTest(e); + } + + @Override + public final boolean isFilterEnabled() + { + return mode.get() != Mode.OFF; + } + + @Override + public final Setting getSetting() + { + return setting; + } + + public enum Mode + { + ON("On"), + IF_CALM("If calm"), + OFF("Off"); + + private final String name; + + private Mode(String name) + { + this.name = name; + } + + @Override + public String toString() + { + return name; + } + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterAllaysSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterAllaysSetting.java index 0627467f59..4332233931 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterAllaysSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterAllaysSetting.java @@ -27,4 +27,9 @@ public static FilterAllaysSetting genericCombat(boolean checked) { return new FilterAllaysSetting("Won't attack allays.", checked); } + + public static FilterAllaysSetting genericVision(boolean checked) + { + return new FilterAllaysSetting("Won't show allays.", checked); + } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterAnimalsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterAnimalsSetting.java deleted file mode 100644 index e5961cd9c4..0000000000 --- a/src/main/java/net/wurstclient/settings/filters/FilterAnimalsSetting.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.settings.filters; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.mob.AmbientEntity; -import net.minecraft.entity.mob.WaterCreatureEntity; -import net.minecraft.entity.passive.AnimalEntity; - -public final class FilterAnimalsSetting extends EntityFilterCheckbox -{ - public FilterAnimalsSetting(String description, boolean checked) - { - super("Filter animals", description, checked); - } - - @Override - public boolean test(Entity e) - { - return !(e instanceof AnimalEntity || e instanceof AmbientEntity - || e instanceof WaterCreatureEntity); - } - - public static FilterAnimalsSetting genericCombat(boolean checked) - { - return new FilterAnimalsSetting("Won't attack pigs, cows, etc.", - checked); - } -} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterArmorStandsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterArmorStandsSetting.java index eb57060476..cf067edfad 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterArmorStandsSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterArmorStandsSetting.java @@ -28,4 +28,10 @@ public static FilterArmorStandsSetting genericCombat(boolean checked) return new FilterArmorStandsSetting("Won't attack armor stands.", checked); } + + public static FilterArmorStandsSetting genericVision(boolean checked) + { + return new FilterArmorStandsSetting("Won't show armor stands.", + checked); + } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java index b37ef49117..98d2bfe192 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java @@ -9,18 +9,30 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.passive.PassiveEntity; +import net.minecraft.entity.passive.TadpoleEntity; public final class FilterBabiesSetting extends EntityFilterCheckbox { + private static final String EXCEPTIONS_TEXT = "\n\nThis filter does not" + + " affect baby zombies and other hostile baby mobs."; + public FilterBabiesSetting(String description, boolean checked) { - super("Filter babies", description, checked); + super("Filter babies", description + EXCEPTIONS_TEXT, checked); } @Override public boolean test(Entity e) { - return !(e instanceof PassiveEntity && ((PassiveEntity)e).isBaby()); + // filter out passive entity babies + if(e instanceof PassiveEntity pe && pe.isBaby()) + return false; + + // filter out tadpoles + if(e instanceof TadpoleEntity) + return false; + + return true; } public static FilterBabiesSetting genericCombat(boolean checked) diff --git a/src/main/java/net/wurstclient/settings/filters/FilterBatsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterBatsSetting.java new file mode 100644 index 0000000000..734c7539b2 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterBatsSetting.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.AmbientEntity; + +public final class FilterBatsSetting extends EntityFilterCheckbox +{ + public FilterBatsSetting(String description, boolean checked) + { + super("Filter bats", description, checked); + } + + @Override + public boolean test(Entity e) + { + return !(e instanceof AmbientEntity); + } + + public static FilterBatsSetting genericCombat(boolean checked) + { + return new FilterBatsSetting("Won't attack bats and any other" + + " \"ambient\" mobs that might be added by mods.", checked); + } + + public static FilterBatsSetting genericVision(boolean checked) + { + return new FilterBatsSetting("Won't show bats and any other" + + " \"ambient\" mobs that might be added by mods.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterEndermenSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterEndermenSetting.java index db60e127db..ddf0f9e55e 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterEndermenSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterEndermenSetting.java @@ -10,21 +10,55 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.mob.EndermanEntity; -public final class FilterEndermenSetting extends EntityFilterCheckbox +public final class FilterEndermenSetting extends AttackDetectingEntityFilter { - public FilterEndermenSetting(String description, boolean checked) + private FilterEndermenSetting(String description, Mode selected, + boolean checked) { - super("Filter endermen", description, checked); + super("Filter endermen", description, selected, checked); + } + + public FilterEndermenSetting(String description, Mode selected) + { + this(description, selected, false); } @Override - public boolean test(Entity e) + public boolean onTest(Entity e) { return !(e instanceof EndermanEntity); } - public static FilterEndermenSetting genericCombat(boolean checked) + @Override + public boolean ifCalmTest(Entity e) + { + return !(e instanceof EndermanEntity ee) || ee.isAttacking(); + } + + public static FilterEndermenSetting genericCombat(Mode selected) + { + return new FilterEndermenSetting("When set to \u00a7lOn\u00a7r," + + " endermen won't be attacked at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, endermen won't be attacked" + + " until they attack first. Be warned that this filter cannot" + + " detect if the endermen are attacking you or someone else.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " endermen can be attacked.", selected); + } + + public static FilterEndermenSetting genericVision(Mode selected) + { + return new FilterEndermenSetting("When set to \u00a7lOn\u00a7r," + + " endermen won't be shown at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, endermen won't be shown" + + " until they attack something.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " endermen can be shown.", selected); + } + + public static FilterEndermenSetting onOffOnly(String description, + boolean onByDefault) { - return new FilterEndermenSetting("Won't attack endermen.", checked); + return new FilterEndermenSetting(description, null, onByDefault); } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterGolemsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterGolemsSetting.java index 0215857cd3..61dd05d84e 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterGolemsSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterGolemsSetting.java @@ -8,6 +8,7 @@ package net.wurstclient.settings.filters; import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.ShulkerEntity; import net.minecraft.entity.passive.GolemEntity; public final class FilterGolemsSetting extends EntityFilterCheckbox @@ -20,12 +21,18 @@ public FilterGolemsSetting(String description, boolean checked) @Override public boolean test(Entity e) { - return !(e instanceof GolemEntity); + return !(e instanceof GolemEntity) || e instanceof ShulkerEntity; } public static FilterGolemsSetting genericCombat(boolean checked) { return new FilterGolemsSetting( - "Won't attack iron golems, snow golems and shulkers.", checked); + "Won't attack iron golems and snow golems.", checked); + } + + public static FilterGolemsSetting genericVision(boolean checked) + { + return new FilterGolemsSetting( + "Won't show iron golems and snow golems.", checked); } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterHostileSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterHostileSetting.java new file mode 100644 index 0000000000..c6d44d5cdc --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterHostileSetting.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.Angerable; +import net.minecraft.entity.mob.Monster; +import net.minecraft.entity.mob.PiglinEntity; + +public final class FilterHostileSetting extends EntityFilterCheckbox +{ + private static final String EXCEPTIONS_TEXT = "\n\nThis filter does not" + + " affect endermen, non-brute piglins, and zombified piglins."; + + public FilterHostileSetting(String description, boolean checked) + { + super("Filter hostile mobs", description + EXCEPTIONS_TEXT, checked); + } + + @Override + public boolean test(Entity e) + { + // never filter out neutral mobs (including piglins) + if(e instanceof Angerable || e instanceof PiglinEntity) + return false; + + return !(e instanceof Monster); + } + + public static FilterHostileSetting genericCombat(boolean checked) + { + return new FilterHostileSetting( + "Won't attack hostile mobs like zombies and creepers.", checked); + } + + public static FilterHostileSetting genericVision(boolean checked) + { + return new FilterHostileSetting( + "Won't show hostile mobs like zombies and creepers.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterInvisibleSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterInvisibleSetting.java index 65699b12fa..67ef67460b 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterInvisibleSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterInvisibleSetting.java @@ -27,4 +27,10 @@ public static FilterInvisibleSetting genericCombat(boolean checked) return new FilterInvisibleSetting("Won't attack invisible entities.", checked); } + + public static FilterInvisibleSetting genericVision(boolean checked) + { + return new FilterInvisibleSetting("Won't show invisible entities.", + checked); + } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterMonstersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterMonstersSetting.java deleted file mode 100644 index 8f07b5d0c6..0000000000 --- a/src/main/java/net/wurstclient/settings/filters/FilterMonstersSetting.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.settings.filters; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.mob.Monster; - -public final class FilterMonstersSetting extends EntityFilterCheckbox -{ - public FilterMonstersSetting(String description, boolean checked) - { - super("Filter monsters", description, checked); - } - - @Override - public boolean test(Entity e) - { - return !(e instanceof Monster); - } - - public static FilterMonstersSetting genericCombat(boolean checked) - { - return new FilterMonstersSetting("Won't attack zombies, creepers, etc.", - checked); - } -} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterNeutralSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterNeutralSetting.java new file mode 100644 index 0000000000..48c94dc665 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterNeutralSetting.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.Angerable; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.entity.mob.PiglinEntity; +import net.minecraft.entity.passive.PufferfishEntity; + +public final class FilterNeutralSetting extends AttackDetectingEntityFilter +{ + private FilterNeutralSetting(String description, Mode selected, + boolean checked) + { + super("Filter neutral mobs", description, selected, checked); + } + + public FilterNeutralSetting(String description, Mode selected) + { + this(description, selected, false); + } + + @Override + public boolean onTest(Entity e) + { + return !(e instanceof Angerable || e instanceof PufferfishEntity + || e instanceof PiglinEntity); + } + + @Override + public boolean ifCalmTest(Entity e) + { + // special case for pufferfish + if(e instanceof PufferfishEntity pfe) + return pfe.getPuffState() > 0; + + if(e instanceof Angerable || e instanceof PiglinEntity) + if(e instanceof MobEntity me) + return me.isAttacking(); + + return true; + } + + public static FilterNeutralSetting genericCombat(Mode selected) + { + return new FilterNeutralSetting("When set to \u00a7lOn\u00a7r," + + " neutral mobs won't be attacked at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, neutral mobs won't be" + + " attacked until they attack first. Be warned that this filter" + + " cannot detect if the neutral mobs are attacking you or someone" + + " else.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " neutral mobs can be attacked.", selected); + } + + public static FilterNeutralSetting genericVision(Mode selected) + { + return new FilterNeutralSetting("When set to \u00a7lOn\u00a7r," + + " neutral mobs won't be shown at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, neutral mobs won't be shown" + + " until they attack something.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " neutral mobs can be shown.", selected); + } + + public static FilterNeutralSetting onOffOnly(String description, + boolean onByDefault) + { + return new FilterNeutralSetting(description, null, onByDefault); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPassiveSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPassiveSetting.java new file mode 100644 index 0000000000..f0b9c8c0eb --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterPassiveSetting.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.AmbientEntity; +import net.minecraft.entity.mob.Angerable; +import net.minecraft.entity.mob.WaterCreatureEntity; +import net.minecraft.entity.passive.AnimalEntity; +import net.minecraft.entity.passive.PufferfishEntity; + +public final class FilterPassiveSetting extends EntityFilterCheckbox +{ + private static final String EXCEPTIONS_TEXT = "\n\nThis filter does not" + + " affect wolves, bees, polar bears, pufferfish, and villagers."; + + public FilterPassiveSetting(String description, boolean checked) + { + super("Filter passive mobs", description + EXCEPTIONS_TEXT, checked); + } + + @Override + public boolean test(Entity e) + { + // never filter out neutral mobs (including pufferfish) + if(e instanceof Angerable || e instanceof PufferfishEntity) + return true; + + return !(e instanceof AnimalEntity || e instanceof AmbientEntity + || e instanceof WaterCreatureEntity); + } + + public static FilterPassiveSetting genericCombat(boolean checked) + { + return new FilterPassiveSetting("Won't attack animals like pigs and" + + " cows, ambient mobs like bats, and water mobs like fish, squid" + + " and dolphins.", checked); + } + + public static FilterPassiveSetting genericVision(boolean checked) + { + return new FilterPassiveSetting("Won't show animals like pigs and" + + " cows, ambient mobs like bats, and water mobs like fish, squid" + + " and dolphins.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPassiveWaterSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPassiveWaterSetting.java new file mode 100644 index 0000000000..86664dc322 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterPassiveWaterSetting.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.WaterCreatureEntity; +import net.minecraft.entity.passive.AxolotlEntity; +import net.minecraft.entity.passive.PufferfishEntity; + +public final class FilterPassiveWaterSetting extends EntityFilterCheckbox +{ + private static final String EXCEPTIONS_TEXT = + "\n\nThis filter does not affect guardians, drowned, and pufferfish."; + + public FilterPassiveWaterSetting(String description, boolean checked) + { + super("Filter passive water mobs", description + EXCEPTIONS_TEXT, + checked); + } + + @Override + public boolean test(Entity e) + { + // never filter out pufferfish + if(e instanceof PufferfishEntity) + return true; + + return !(e instanceof WaterCreatureEntity + || e instanceof AxolotlEntity); + } + + public static FilterPassiveWaterSetting genericCombat(boolean checked) + { + return new FilterPassiveWaterSetting("Won't attack passive water mobs" + + " like fish, squid, dolphins and axolotls.", checked); + } + + public static FilterPassiveWaterSetting genericVision(boolean checked) + { + return new FilterPassiveWaterSetting("Won't show passive water mobs" + + " like fish, squid, dolphins and axolotls.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPetsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPetsSetting.java index 7dd99222b9..72c4409d21 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterPetsSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterPetsSetting.java @@ -31,4 +31,10 @@ public static FilterPetsSetting genericCombat(boolean checked) return new FilterPetsSetting( "Won't attack tamed wolves, tamed horses, etc.", checked); } + + public static FilterPetsSetting genericVision(boolean checked) + { + return new FilterPetsSetting( + "Won't show tamed wolves, tamed horses, etc.", checked); + } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPiglinsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPiglinsSetting.java new file mode 100644 index 0000000000..005191ff20 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterPiglinsSetting.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.PiglinEntity; + +public final class FilterPiglinsSetting extends AttackDetectingEntityFilter +{ + private static final String EXCEPTIONS_TEXT = + "\n\nThis filter does not affect piglin brutes."; + + private FilterPiglinsSetting(String description, Mode selected, + boolean checked) + { + super("Filter piglins", description + EXCEPTIONS_TEXT, selected, + checked); + } + + public FilterPiglinsSetting(String description, Mode selected) + { + this(description, selected, false); + } + + @Override + public boolean onTest(Entity e) + { + return !(e instanceof PiglinEntity); + } + + @Override + public boolean ifCalmTest(Entity e) + { + return !(e instanceof PiglinEntity pe) || pe.isAttacking(); + } + + public static FilterPiglinsSetting genericCombat(Mode selected) + { + return new FilterPiglinsSetting("When set to \u00a7lOn\u00a7r," + + " piglins won't be attacked at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, piglins won't be attacked" + + " until they attack first. Be warned that this filter cannot" + + " detect if the piglins are attacking you or someone else.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " piglins can be attacked.", selected); + } + + public static FilterPiglinsSetting genericVision(Mode selected) + { + return new FilterPiglinsSetting("When set to \u00a7lOn\u00a7r," + + " piglins won't be shown at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, piglins won't be shown until" + + " they attack something.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " piglins can be shown.", selected); + } + + public static FilterPiglinsSetting onOffOnly(String description, + boolean onByDefault) + { + return new FilterPiglinsSetting(description, null, onByDefault); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPigmenSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPigmenSetting.java deleted file mode 100644 index 40b8d998fe..0000000000 --- a/src/main/java/net/wurstclient/settings/filters/FilterPigmenSetting.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.settings.filters; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.mob.ZombifiedPiglinEntity; - -public final class FilterPigmenSetting extends EntityFilterCheckbox -{ - public FilterPigmenSetting(String description, boolean checked) - { - super("Filter pigmen", description, checked); - } - - @Override - public boolean test(Entity e) - { - return !(e instanceof ZombifiedPiglinEntity); - } - - public static FilterPigmenSetting genericCombat(boolean checked) - { - return new FilterPigmenSetting("Won't attack zombie pigmen.", checked); - } -} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterPlayersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterPlayersSetting.java index 80a5921fac..1c0bc4bbef 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterPlayersSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterPlayersSetting.java @@ -27,4 +27,9 @@ public static FilterPlayersSetting genericCombat(boolean checked) { return new FilterPlayersSetting("Won't attack other players.", checked); } + + public static FilterPlayersSetting genericVision(boolean checked) + { + return new FilterPlayersSetting("Won't show other players.", checked); + } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterShulkersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterShulkersSetting.java new file mode 100644 index 0000000000..a6797d4ad2 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterShulkersSetting.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.ShulkerEntity; + +public final class FilterShulkersSetting extends EntityFilterCheckbox +{ + public FilterShulkersSetting(String description, boolean checked) + { + super("Filter shulkers", description, checked); + } + + @Override + public boolean test(Entity e) + { + return !(e instanceof ShulkerEntity); + } + + public static FilterShulkersSetting genericCombat(boolean checked) + { + return new FilterShulkersSetting("Won't attack shulkers.", checked); + } + + public static FilterShulkersSetting genericVision(boolean checked) + { + return new FilterShulkersSetting("Won't show shulkers.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterSleepingSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterSleepingSetting.java index 470f9cba19..b78d0c7155 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterSleepingSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterSleepingSetting.java @@ -8,6 +8,7 @@ package net.wurstclient.settings.filters; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityPose; import net.minecraft.entity.player.PlayerEntity; public final class FilterSleepingSetting extends EntityFilterCheckbox @@ -20,16 +21,22 @@ public FilterSleepingSetting(String description, boolean checked) @Override public boolean test(Entity e) { - if(!(e instanceof PlayerEntity)) + if(!(e instanceof PlayerEntity pe)) return true; - return !((PlayerEntity)e).isSleeping(); + return !pe.isSleeping() && pe.getPose() != EntityPose.SLEEPING; } public static FilterSleepingSetting genericCombat(boolean checked) { return new FilterSleepingSetting("Won't attack sleeping players.\n\n" - + "Useful for servers like Mineplex that place sleeping players on the ground to make them look like corpses.", + + "Useful for servers like Mineplex that place sleeping players on" + + " the ground to make them look like corpses.", checked); + } + + public static FilterSleepingSetting genericVision(boolean checked) + { + return new FilterSleepingSetting("Won't show sleeping players.", checked); } } diff --git a/src/main/java/net/wurstclient/settings/filters/FilterSlimesSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterSlimesSetting.java new file mode 100644 index 0000000000..9783f59bc9 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterSlimesSetting.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.MagmaCubeEntity; +import net.minecraft.entity.mob.SlimeEntity; + +public final class FilterSlimesSetting extends EntityFilterCheckbox +{ + private static final String EXCEPTIONS_TEXT = + "\n\nThis filter does not affect magma cubes."; + + public FilterSlimesSetting(String description, boolean checked) + { + super("Filter slimes", description + EXCEPTIONS_TEXT, checked); + } + + @Override + public boolean test(Entity e) + { + return !(e instanceof SlimeEntity) || e instanceof MagmaCubeEntity; + } + + public static FilterSlimesSetting genericCombat(boolean checked) + { + return new FilterSlimesSetting("Won't attack slimes.", checked); + } + + public static FilterSlimesSetting genericVision(boolean checked) + { + return new FilterSlimesSetting("Won't show slimes.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterTradersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterTradersSetting.java deleted file mode 100644 index 08660308cb..0000000000 --- a/src/main/java/net/wurstclient/settings/filters/FilterTradersSetting.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.settings.filters; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.MerchantEntity; - -public final class FilterTradersSetting extends EntityFilterCheckbox -{ - public FilterTradersSetting(String description, boolean checked) - { - super("Filter traders", description, checked); - } - - @Override - public boolean test(Entity e) - { - return !(e instanceof MerchantEntity); - } - - public static FilterTradersSetting genericCombat(boolean checked) - { - return new FilterTradersSetting( - "Won't attack villagers, wandering traders, etc.", checked); - } -} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterVillagersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterVillagersSetting.java new file mode 100644 index 0000000000..31f6f649b4 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterVillagersSetting.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.passive.MerchantEntity; + +public final class FilterVillagersSetting extends EntityFilterCheckbox +{ + public FilterVillagersSetting(String description, boolean checked) + { + super("Filter villagers", description, checked); + } + + @Override + public boolean test(Entity e) + { + return !(e instanceof MerchantEntity); + } + + public static FilterVillagersSetting genericCombat(boolean checked) + { + return new FilterVillagersSetting( + "Won't attack villagers and wandering traders.", checked); + } + + public static FilterVillagersSetting genericVision(boolean checked) + { + return new FilterVillagersSetting( + "Won't show villagers and wandering traders.", checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterZombiePiglinsSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterZombiePiglinsSetting.java new file mode 100644 index 0000000000..62fae589c9 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterZombiePiglinsSetting.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.ZombifiedPiglinEntity; + +public final class FilterZombiePiglinsSetting + extends AttackDetectingEntityFilter +{ + private FilterZombiePiglinsSetting(String description, Mode selected, + boolean checked) + { + super("Filter zombie piglins", description, selected, checked); + } + + public FilterZombiePiglinsSetting(String description, Mode selected) + { + this(description, selected, false); + } + + @Override + public boolean onTest(Entity e) + { + return !(e instanceof ZombifiedPiglinEntity); + } + + @Override + public boolean ifCalmTest(Entity e) + { + return !(e instanceof ZombifiedPiglinEntity zpe) || zpe.isAttacking(); + } + + public static FilterZombiePiglinsSetting genericCombat(Mode selected) + { + return new FilterZombiePiglinsSetting("When set to \u00a7lOn\u00a7r," + + " zombified piglins won't be attacked at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, zombified piglins won't be" + + " attacked until they attack first. Be warned that this filter" + + " cannot detect if the zombified piglins are attacking you or" + + " someone else.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " zombified piglins can be attacked.", selected); + } + + public static FilterZombiePiglinsSetting genericVision(Mode selected) + { + return new FilterZombiePiglinsSetting("When set to \u00a7lOn\u00a7r," + + " zombified piglins won't be shown at all.\n\n" + + "When set to \u00a7lIf calm\u00a7r, zombified piglins won't be" + + " shown until they attack something.\n\n" + + "When set to \u00a7lOff\u00a7r, this filter does nothing and" + + " zombified piglins can be shown.", selected); + } + + public static FilterZombiePiglinsSetting onOffOnly(String description, + boolean onByDefault) + { + return new FilterZombiePiglinsSetting(description, null, onByDefault); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterZombieVillagersSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterZombieVillagersSetting.java new file mode 100644 index 0000000000..205ba327d2 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterZombieVillagersSetting.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014-2023 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.mob.ZombieVillagerEntity; + +public final class FilterZombieVillagersSetting extends EntityFilterCheckbox +{ + public FilterZombieVillagersSetting(String description, boolean checked) + { + super("Filter zombie villagers", description, checked); + } + + @Override + public boolean test(Entity e) + { + return !(e instanceof ZombieVillagerEntity); + } + + public static FilterZombieVillagersSetting genericCombat(boolean checked) + { + return new FilterZombieVillagersSetting( + "Won't attack zombified villagers.", checked); + } + + public static FilterZombieVillagersSetting genericVision(boolean checked) + { + return new FilterZombieVillagersSetting( + "Won't show zombified villagers.", checked); + } +} diff --git a/src/main/java/net/wurstclient/treebot/TreeBotUtils.java b/src/main/java/net/wurstclient/treebot/TreeBotUtils.java index 58cfad2833..fb609157d7 100644 --- a/src/main/java/net/wurstclient/treebot/TreeBotUtils.java +++ b/src/main/java/net/wurstclient/treebot/TreeBotUtils.java @@ -12,13 +12,10 @@ import net.minecraft.block.Block; import net.minecraft.block.Blocks; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; -import net.minecraft.world.RaycastContext; -import net.wurstclient.WurstClient; import net.wurstclient.util.BlockUtils; import net.wurstclient.util.RotationUtils; @@ -79,7 +76,7 @@ public static Direction getLineOfSightSide(Vec3d eyesPos, BlockPos pos) if(distancesSq[i] >= distanceSqToCenter) continue; - linesOfSight[i] = hasLineOfSight(eyesPos, hitVecs[i]); + linesOfSight[i] = BlockUtils.hasLineOfSight(eyesPos, hitVecs[i]); } Direction side = null; @@ -104,14 +101,4 @@ public static Direction getLineOfSightSide(Vec3d eyesPos, BlockPos pos) // will be null if no LOS was found return side; } - - private static boolean hasLineOfSight(Vec3d from, Vec3d to) - { - RaycastContext context = - new RaycastContext(from, to, RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, WurstClient.MC.player); - - return WurstClient.MC.world.raycast(context) - .getType() == HitResult.Type.MISS; - } } diff --git a/src/main/java/net/wurstclient/util/BlockBreaker.java b/src/main/java/net/wurstclient/util/BlockBreaker.java index 16398f6f4f..47c84f134f 100644 --- a/src/main/java/net/wurstclient/util/BlockBreaker.java +++ b/src/main/java/net/wurstclient/util/BlockBreaker.java @@ -14,14 +14,12 @@ import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.Action; import net.minecraft.util.Hand; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; import net.minecraft.util.shape.VoxelShape; -import net.minecraft.world.RaycastContext; import net.wurstclient.WurstClient; public enum BlockBreaker @@ -94,11 +92,7 @@ public static BlockBreakingParams getBlockBreakingParams(BlockPos pos) if(distancesSq[i] >= distanceSqToCenter) continue; - linesOfSight[i] = MC.world - .raycast(new RaycastContext(eyesPos, hitVecs[i], - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() == HitResult.Type.MISS; + linesOfSight[i] = BlockUtils.hasLineOfSight(eyesPos, hitVecs[i]); } Direction side = sides[0]; diff --git a/src/main/java/net/wurstclient/util/BlockPlacer.java b/src/main/java/net/wurstclient/util/BlockPlacer.java index 829d967764..96121057fe 100644 --- a/src/main/java/net/wurstclient/util/BlockPlacer.java +++ b/src/main/java/net/wurstclient/util/BlockPlacer.java @@ -10,14 +10,12 @@ import net.minecraft.block.BlockState; import net.minecraft.client.MinecraftClient; import net.minecraft.util.hit.BlockHitResult; -import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; import net.minecraft.util.shape.VoxelShape; -import net.minecraft.world.RaycastContext; import net.wurstclient.WurstClient; import net.wurstclient.mixinterface.IMinecraftClient; import net.wurstclient.util.BlockBreaker.BlockBreakingParams; @@ -124,11 +122,7 @@ public static BlockPlacingParams getBlockPlacingParams(BlockPos pos) if(distancesSq[i] <= distanceSqToPosVec) continue; - linesOfSight[i] = MC.world - .raycast(new RaycastContext(eyesPos, hitVecs[i], - RaycastContext.ShapeType.COLLIDER, - RaycastContext.FluidHandling.NONE, MC.player)) - .getType() == HitResult.Type.MISS; + linesOfSight[i] = BlockUtils.hasLineOfSight(eyesPos, hitVecs[i]); } // decide which side to use diff --git a/src/main/java/net/wurstclient/util/BlockUtils.java b/src/main/java/net/wurstclient/util/BlockUtils.java index 139b0a6c66..8cdfbb30f1 100644 --- a/src/main/java/net/wurstclient/util/BlockUtils.java +++ b/src/main/java/net/wurstclient/util/BlockUtils.java @@ -17,10 +17,14 @@ import net.minecraft.registry.Registries; import net.minecraft.util.Identifier; import net.minecraft.util.InvalidIdentifierException; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.shape.VoxelShape; import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.RaycastContext; import net.wurstclient.WurstClient; public enum BlockUtils @@ -125,6 +129,26 @@ public static boolean isOpaqueFullCube(BlockPos pos) return getState(pos).isOpaqueFullCube(MC.world, pos); } + public static BlockHitResult raycast(Vec3d from, Vec3d to) + { + RaycastContext context = + new RaycastContext(from, to, RaycastContext.ShapeType.COLLIDER, + RaycastContext.FluidHandling.NONE, MC.player); + + return MC.world.raycast(context); + } + + public static boolean hasLineOfSight(Vec3d from, Vec3d to) + { + return raycast(from, to).getType() == HitResult.Type.MISS; + } + + public static boolean hasLineOfSight(Vec3d to) + { + return raycast(RotationUtils.getEyesPos(), to) + .getType() == HitResult.Type.MISS; + } + public static ArrayList getAllInBox(BlockPos from, BlockPos to) { ArrayList blocks = new ArrayList<>(); diff --git a/src/main/java/net/wurstclient/util/EntityUtils.java b/src/main/java/net/wurstclient/util/EntityUtils.java index 47918d06d0..68b00e7921 100644 --- a/src/main/java/net/wurstclient/util/EntityUtils.java +++ b/src/main/java/net/wurstclient/util/EntityUtils.java @@ -46,7 +46,7 @@ public static Stream getAttackableEntities() public static Stream 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); } diff --git a/src/main/java/net/wurstclient/util/RotationUtils.java b/src/main/java/net/wurstclient/util/RotationUtils.java index d267c91970..f17bdfb77e 100644 --- a/src/main/java/net/wurstclient/util/RotationUtils.java +++ b/src/main/java/net/wurstclient/util/RotationUtils.java @@ -28,16 +28,16 @@ public static Vec3d getEyesPos() player.getZ()); } - public static Vec3d getClientLookVec() + public static Vec3d getClientLookVec(float partialTicks) { ClientPlayerEntity player = WurstClient.MC.player; float f = 0.017453292F; float pi = (float)Math.PI; - float f1 = MathHelper.cos(-player.getYaw() * f - pi); - float f2 = MathHelper.sin(-player.getYaw() * f - pi); - float f3 = -MathHelper.cos(-player.getPitch() * f); - float f4 = MathHelper.sin(-player.getPitch() * f); + float f1 = MathHelper.cos(-player.getYaw(partialTicks) * f - pi); + float f2 = MathHelper.sin(-player.getYaw(partialTicks) * f - pi); + float f3 = -MathHelper.cos(-player.getPitch(partialTicks) * f); + float f4 = MathHelper.sin(-player.getPitch(partialTicks) * f); return new Vec3d(f2 * f3, f4, f1 * f3); } diff --git a/src/main/resources/assets/wurst/lang/ja_jp.json b/src/main/resources/assets/wurst/lang/ja_jp.json index 643433c90e..2f2eae7e45 100644 --- a/src/main/resources/assets/wurst/lang/ja_jp.json +++ b/src/main/resources/assets/wurst/lang/ja_jp.json @@ -1,9 +1,11 @@ { + "description.wurst.hack.aimassist": "近くの存在を狙うのに役立ちます。", "description.wurst.hack.airplace": "空中にブロックを設置できるようになる。", "description.wurst.hack.anchoraura": "リスポーンアンカーを自動で設置(任意)、チャージ、爆発させ、付近にいるエンティティを倒す。", "description.wurst.hack.antiafk": "離席を検知されないよう、辺りをランダムに歩き回る。\n最低3×3の広さの自由なスペースが必要。", "description.wurst.hack.antiblind": "盲目や暗闇の効果を防ぎます。\nOptiFineとの互換性はありません。", "description.wurst.hack.anticactus": "サボテンのダメージを無効化する。", + "description.wurst.hack.antientitypush": "プレイヤーやモブに押されるのを防ぎます。", "description.wurst.hack.antihunger": "歩行中に空腹度ゲージの減少を抑える。", "description.wurst.hack.antiknockback": "プレイヤーやモブからのノックバックを無効化する。", "description.wurst.hack.antispam": "同じ内容のメッセージにカウントを表示し、チャットスパムを防ぐ。", @@ -14,8 +16,10 @@ "description.wurst.setting.arrowdmg.trident_yeet_mode": "有効時、トライデントがより遠くまで飛ばせるようになる。ダメージ量や激流エンチャントには影響しない模様。\n\n§c§l注意: §rこのオプションを有効化した場合、トライデントをロストしやすくなる。", "description.wurst.hack.autoarmor": "防具を自動で管理する。", "description.wurst.hack.autobuild": "自動で建築を行う。\nブロックを一つ設置することで建築が開始される。", + "description.wurst.hack.autocomplete": "大規模な言語モデルを使用してチャット メッセージをオートコンプリートします。 API アクセスのある OpenAI アカウント、または oobabooga Web UI を使用してローカルにインストールされた言語モデルのいずれかが必要です。", "description.wurst.hack.autodrop": "必要のないアイテムを自動で捨てる。", "description.wurst.hack.autoleave": "残り体力が少なくなるとに自動的にサーバーから切断する。", + "description.wurst.hack.autolibrarian": "村人を自動的に訓練して、特定の魔法の本を販売する司書にします。 このハックを使用すると、すぐに取引ホール全体をセットアップできます。", "description.wurst.hack.autoeat": "必要であれば自動で食料を食べる。", "description.wurst.setting.autoeat.target_hunger": "食料から得られる満腹度を無駄にしないようにしつつ、満腹度をこのレベル以上に維持しようとする。", "description.wurst.setting.autoeat.min_hunger": "食料から得られる満腹度を無駄にしても、常に満腹度をこのレベル以上に維持しようとする。\n6.5 - 通常版のマインクラフトの食料では、満腹度が無駄になることはない。\n10.0 - 満腹度の無駄を無視して常に満腹度を満タンにする。", @@ -132,6 +136,7 @@ "description.wurst.hack.rainbowui": "§cす§aべ§9て§cを§aカ§9ラ§cフ§aル§9に§cす§aる§9。", "description.wurst.hack.reach": "より遠くに手が届くようになる。", "description.wurst.hack.remoteview": "他人の視点でワールドを見ることができるようになる。\n.rv で特定のエンティティを対象として指定可能。", + "description.wurst.hack.restock": "インベントリから選択したアイテムを自動的に手に補充します。 FastPlace と併用するとより効果的です。", "description.wurst.hack.safewalk": "ブロックの端からの落下を防ぐ。", "description.wurst.hack.scaffoldwalk": "足元に自動でブロックを設置する。", "description.wurst.hack.search": "特定のブロックを虹色でハイライト表示し、探しやすくする。", @@ -184,4 +189,4 @@ "description.wurst.nochatreports.message_is_reportable": "このメッセージには有効な署名があるため、不正なチャット レポートに対して脆弱です。", "gui.wurst.generic.allcaps_blocked": "ブロックされました", "gui.wurst.generic.allcaps_allowed": "許可された" -} \ No newline at end of file +} diff --git a/src/main/resources/wurst.mixins.json b/src/main/resources/wurst.mixins.json index 460af9db5c..390ee2bd6a 100644 --- a/src/main/resources/wurst.mixins.json +++ b/src/main/resources/wurst.mixins.json @@ -40,7 +40,6 @@ "KeyBindingMixin", "KeyboardMixin", "LanguageManagerMixin", - "LightTextureManagerMixin", "LivingEntityRendererMixin", "MinecraftClientMixin", "MouseMixin",