merge world and player category into World & Interactions
Some checks failed
/ Build BaseBand DSM & Broadway (push) Has been cancelled

This commit is contained in:
Daniella / Tove 2024-06-17 08:26:20 +02:00
parent d7ff8d17cb
commit f07f47f3d0
15 changed files with 44 additions and 56 deletions

View file

@ -10,11 +10,11 @@ import de.com.baseband.client.feature.modules.movement.ElytraBot;
import de.com.baseband.client.feature.modules.movement.ElytraFly; import de.com.baseband.client.feature.modules.movement.ElytraFly;
import de.com.baseband.client.feature.modules.movement.NoSlowDown; import de.com.baseband.client.feature.modules.movement.NoSlowDown;
import de.com.baseband.client.feature.modules.movement.Velocity; import de.com.baseband.client.feature.modules.movement.Velocity;
import de.com.baseband.client.feature.modules.player.AntiLevitation; import de.com.baseband.client.feature.modules.movement.AntiLevitation;
import de.com.baseband.client.feature.modules.player.AutoRespawn; import de.com.baseband.client.feature.modules.ingame.AutoRespawn;
import de.com.baseband.client.feature.modules.player.InteractionTweaks; import de.com.baseband.client.feature.modules.ingame.InteractionTweaks;
import de.com.baseband.client.feature.modules.render.*; import de.com.baseband.client.feature.modules.render.*;
import de.com.baseband.client.feature.modules.world.*; import de.com.baseband.client.feature.modules.ingame.*;
/** /**
* @author TudbuT * @author TudbuT

View file

@ -14,9 +14,8 @@ public enum Category {
CHAT("Chat", Chat.class), CHAT("Chat", Chat.class),
COMBAT("Combat", Combat.class), COMBAT("Combat", Combat.class),
MOVEMENT("Movement", Movement.class), MOVEMENT("Movement", Movement.class),
PLAYER("Player", Player.class),
RENDER("Render", Render.class), RENDER("Render", Render.class),
WORLD("World", World.class), INGAME("World & Interactions", Ingame.class),
CLIENT("Client", ClientCategory.class) CLIENT("Client", ClientCategory.class)
; ;

View file

@ -7,5 +7,5 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface World { public @interface Ingame {
} }

View file

@ -1,11 +0,0 @@
package de.com.baseband.client.feature.category;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Player {
}

View file

@ -1,9 +1,9 @@
package de.com.baseband.client.feature.modules.world; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.event.events.BaritoneEvent; import de.com.baseband.client.event.events.BaritoneEvent;
import de.com.baseband.client.event.events.PacketEvent; import de.com.baseband.client.event.events.PacketEvent;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.World; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.mixin.mixins.IMinecraft; import de.com.baseband.client.mixin.mixins.IMinecraft;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
@ -19,7 +19,7 @@ import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.FoodStats; import net.minecraft.util.FoodStats;
@World @Ingame
public class AutoEat extends Feature { public class AutoEat extends Feature {
private int lastSlot = -1; private int lastSlot = -1;

View file

@ -1,19 +1,19 @@
package de.com.baseband.client.feature.modules.player; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.BaseBand; import de.com.baseband.client.BaseBand;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Player; import de.com.baseband.client.feature.category.Ingame;
import de.tudbut.tools.Lock; import de.tudbut.tools.Lock;
import net.minecraft.client.gui.GuiGameOver; import net.minecraft.client.gui.GuiGameOver;
@Player @Ingame
public class AutoRespawn extends Feature { public class AutoRespawn extends Feature {
@Override @Override
public String toString() { public String toString() {
return "AutoRespawn"; return "AutoRespawn";
} }
Lock lock = new Lock(false); Lock lock = new Lock();
public void onTick() { public void onTick() {
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) { if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {

View file

@ -1,10 +1,10 @@
package de.com.baseband.client.feature.modules.world; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.World; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
@World @Ingame
public class AutoSignText extends Feature { public class AutoSignText extends Feature {
@Override @Override
public String toString() { public String toString() {

View file

@ -1,9 +1,9 @@
package de.com.baseband.client.feature.modules.player; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.event.events.DamageBlockEvent; import de.com.baseband.client.event.events.DamageBlockEvent;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.Features; import de.com.baseband.client.feature.Features;
import de.com.baseband.client.feature.category.Player; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.mixin.mixins.IMinecraft; import de.com.baseband.client.mixin.mixins.IMinecraft;
import de.com.baseband.client.mixin.mixins.IPlayerControllerMP; import de.com.baseband.client.mixin.mixins.IPlayerControllerMP;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
@ -13,7 +13,7 @@ import net.minecraft.network.play.client.CPacketPlayerDigging;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@Player @Ingame
public class InteractionTweaks extends Feature { public class InteractionTweaks extends Feature {
@Override @Override
public String toString() { public String toString() {
@ -26,7 +26,7 @@ public class InteractionTweaks extends Feature {
Features.ifFeaturePresent(FastBreak.class, subComponents::add); Features.ifFeaturePresent(FastBreak.class, subComponents::add);
} }
@Player @Ingame
public static class FastUse extends Feature { public static class FastUse extends Feature {
@Override @Override
public String toString() { public String toString() {
@ -56,7 +56,7 @@ public class InteractionTweaks extends Feature {
} }
} }
@Player @Ingame
public static class FastBreak extends Feature { public static class FastBreak extends Feature {
public enum Mode { public enum Mode {

View file

@ -1,8 +1,9 @@
package de.com.baseband.client.feature.modules.client; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.BaseBand; import de.com.baseband.client.BaseBand;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.ClientCategory; import de.com.baseband.client.feature.category.ClientCategory;
import de.com.baseband.client.feature.modules.client.Client;
import de.com.baseband.client.registry.PlayerDB; import de.com.baseband.client.registry.PlayerDB;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
import de.com.baseband.client.util.interact.Chat; import de.com.baseband.client.util.interact.Chat;
@ -52,10 +53,10 @@ public class MidClick extends Feature {
public enum BlockAction { public enum BlockAction {
None((b) -> {}), None((b) -> {}),
Select((b) -> { Select((b) -> {
de.com.baseband.client.feature.modules.world.Select.begin = b; de.com.baseband.client.feature.modules.ingame.Select.begin = b;
de.com.baseband.client.feature.modules.world.Select.end = b; de.com.baseband.client.feature.modules.ingame.Select.end = b;
}), }),
Corner(de.com.baseband.client.feature.modules.world.Select::select), Corner(de.com.baseband.client.feature.modules.ingame.Select::select),
; ;
public final Consumer<BlockPos> action; public final Consumer<BlockPos> action;
BlockAction(Consumer<BlockPos> action) { BlockAction(Consumer<BlockPos> action) {

View file

@ -1,14 +1,14 @@
package de.com.baseband.client.feature.modules.world; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.event.events.PacketEvent; import de.com.baseband.client.event.events.PacketEvent;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.World; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
import de.com.baseband.client.registry.annotation.Description; import de.com.baseband.client.registry.annotation.Description;
import de.com.baseband.client.registry.annotation.Range; import de.com.baseband.client.registry.annotation.Range;
import net.minecraft.network.play.client.CPacketKeepAlive; import net.minecraft.network.play.client.CPacketKeepAlive;
@World @Ingame
public class Ping extends Feature { public class Ping extends Feature {
PacketHolder holder = null; PacketHolder holder = null;

View file

@ -1,9 +1,9 @@
package de.com.baseband.client.feature.modules.world; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.BaseBand; import de.com.baseband.client.BaseBand;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.Features; import de.com.baseband.client.feature.Features;
import de.com.baseband.client.feature.category.World; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.feature.modules.render.ClickGUI; import de.com.baseband.client.feature.modules.render.ClickGUI;
import de.com.baseband.client.registry.annotation.*; import de.com.baseband.client.registry.annotation.*;
import de.com.baseband.client.util.adapt.Marker; import de.com.baseband.client.util.adapt.Marker;
@ -24,7 +24,7 @@ import org.lwjgl.opengl.GL11;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Objects; import java.util.Objects;
@World @Ingame
@Description("Shows changes done to the world compared to its original state\n" + @Description("Shows changes done to the world compared to its original state\n" +
"This module works similarly to the original in TTC, but is written form the ground up because the old code sucked.") "This module works similarly to the original in TTC, but is written form the ground up because the old code sucked.")
public class SeedOverlay extends Feature { public class SeedOverlay extends Feature {

View file

@ -1,14 +1,14 @@
package de.com.baseband.client.feature.modules.world; package de.com.baseband.client.feature.modules.ingame;
import de.com.baseband.client.BaseBand; import de.com.baseband.client.BaseBand;
import de.com.baseband.client.event.Priority; import de.com.baseband.client.event.Priority;
import de.com.baseband.client.event.events.SelectEvent; import de.com.baseband.client.event.events.SelectEvent;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.World; import de.com.baseband.client.feature.category.Ingame;
import de.com.baseband.client.util.type.Selection; import de.com.baseband.client.util.type.Selection;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@World @Ingame
public class Select extends Feature { public class Select extends Feature {
public static BlockPos begin, end; public static BlockPos begin, end;

View file

@ -1,12 +1,12 @@
package de.com.baseband.client.feature.modules.player; package de.com.baseband.client.feature.modules.movement;
import de.com.baseband.client.event.events.MoveEvent; import de.com.baseband.client.event.events.MoveEvent;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Player; import de.com.baseband.client.feature.category.Movement;
import de.com.baseband.client.registry.annotation.Config; import de.com.baseband.client.registry.annotation.Config;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
@Player @Movement
public class AntiLevitation extends Feature { public class AntiLevitation extends Feature {
@Override @Override
public String toString() { public String toString() {
@ -16,7 +16,7 @@ public class AntiLevitation extends Feature {
@Config("Mode") @Config("Mode")
public Mode mode = Mode.Motion; public Mode mode = Mode.Motion;
enum Mode { public enum Mode {
Effect, Effect,
Motion Motion
} }

View file

@ -11,7 +11,7 @@ import de.com.baseband.client.feature.modules.client.Client;
import de.com.baseband.client.feature.modules.movement.Velocity; import de.com.baseband.client.feature.modules.movement.Velocity;
import de.com.baseband.client.feature.modules.render.NoRender; import de.com.baseband.client.feature.modules.render.NoRender;
import de.com.baseband.client.feature.modules.render.SwingSpeed; import de.com.baseband.client.feature.modules.render.SwingSpeed;
import de.com.baseband.client.feature.modules.world.AutoSignText; import de.com.baseband.client.feature.modules.ingame.AutoSignText;
import de.com.baseband.client.util.adapt.FieldFinder; import de.com.baseband.client.util.adapt.FieldFinder;
import de.com.baseband.client.util.net.ScreenshotHelper; import de.com.baseband.client.util.net.ScreenshotHelper;
import net.minecraft.client.gui.ChatLine; import net.minecraft.client.gui.ChatLine;
@ -136,10 +136,8 @@ public class MixinProxy {
} }
public static int swingSpeed() { public static int swingSpeed() {
SwingSpeed swingSpeed = Features.getFeature(SwingSpeed.class);
if(Features.isFeatureEnabled(SwingSpeed.class)) { if(Features.isFeatureEnabled(SwingSpeed.class)) {
return swingSpeed.swingSpeed; return Features.getFeature(SwingSpeed.class).swingSpeed;
} else { } else {
return -1; return -1;
} }

View file

@ -11,8 +11,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
public class MixinEntityLivingBase { public class MixinEntityLivingBase {
@Inject(method = {"getArmSwingAnimationEnd"}, at = {@At(value = "HEAD")}, cancellable = true) @Inject(method = {"getArmSwingAnimationEnd"}, at = {@At(value = "HEAD")}, cancellable = true)
private void getArmSwingAnimationEnd(CallbackInfoReturnable<Integer> info) { private void getArmSwingAnimationEnd(CallbackInfoReturnable<Integer> info) {
if (MixinProxy.swingSpeed() != -1) { int swingSpeed = MixinProxy.swingSpeed();
info.setReturnValue(MixinProxy.swingSpeed()); if (swingSpeed != -1) {
info.setReturnValue(swingSpeed);
} }
} }
} }