stuff stuff stuff
yea yea yea yea yeayea yea yeay ay aey yea y eay eayae yey ae yeaye ayea yea
This commit is contained in:
parent
1547326a54
commit
e55b9e51b4
35 changed files with 140 additions and 146 deletions
|
@ -39,12 +39,6 @@ dependencies {
|
|||
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
|
||||
|
||||
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.24'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.24'
|
||||
|
||||
testCompileOnly 'org.projectlombok:lombok:1.18.24'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
@ -5,7 +5,7 @@ org.gradle.parallel=true
|
|||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.2
|
||||
yarn_mappings=1.20.1+build.9
|
||||
loader_version=0.14.21
|
||||
|
||||
# Mod Properties
|
||||
|
@ -14,6 +14,6 @@ org.gradle.parallel=true
|
|||
archives_base_name = chipmunkmod
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.83.1+1.20.1
|
||||
fabric_version=0.84.0+1.20.1
|
||||
|
||||
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
7
gradlew
vendored
7
gradlew
vendored
|
@ -85,9 +85,6 @@ done
|
|||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
|
@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
|||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
config.stopBubbling = true
|
||||
lombok.accessors.fluent = true
|
|
@ -3,7 +3,7 @@ package land.chipmunk.chipmunkmod;
|
|||
import com.google.gson.JsonObject;
|
||||
import land.chipmunk.chipmunkmod.data.BlockArea;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
|
||||
public class Configuration {
|
||||
public CommandManager commands = new CommandManager();
|
||||
|
@ -30,16 +30,24 @@ public class Configuration {
|
|||
public TestBotInfo testbot = new TestBotInfo("-", null);
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
public static class TestBotInfo {
|
||||
public String prefix;
|
||||
public String webhookUrl;
|
||||
|
||||
public TestBotInfo (String prefix, String webhookUrl) {
|
||||
this.prefix = prefix;
|
||||
this.webhookUrl = webhookUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
public static class BotInfo {
|
||||
public String prefix;
|
||||
public String key;
|
||||
|
||||
public BotInfo (String prefix, String key) {
|
||||
this.prefix = prefix;
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomChat {
|
||||
|
|
|
@ -28,11 +28,11 @@ public class AutoSkinCommand {
|
|||
|
||||
final String username = getString(context, "username");
|
||||
|
||||
SelfCare.INSTANCE.skin(username);
|
||||
SelfCare.INSTANCE.skin = username;
|
||||
|
||||
if (username.equals("off")) source.sendFeedback(Text.literal("Successfully disabled auto skin"));
|
||||
else {
|
||||
SelfCare.INSTANCE.hasSkin(false);
|
||||
SelfCare.INSTANCE.hasSkin = false;
|
||||
source.sendFeedback(Text.literal("Set your auto skin username to: " + username));
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CloopCommand {
|
|||
final CommandLoopManager manager = CommandLoopManager.INSTANCE;
|
||||
final int id = getInteger(context, "id");
|
||||
|
||||
if (id < 0 || id >= manager.commandLoops().size()) throw INVALID_CLOOP_ID_EXCEPTION.create(id);
|
||||
if (id < 0 || id >= manager.commandLoops.size()) throw INVALID_CLOOP_ID_EXCEPTION.create(id);
|
||||
|
||||
manager.removeAndStop(id);
|
||||
|
||||
|
@ -88,11 +88,11 @@ public class CloopCommand {
|
|||
|
||||
public static int listCloops (CommandContext<FabricClientCommandSource> context) {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final List<CommandLoopManager.CommandLoop> loops = CommandLoopManager.INSTANCE.commandLoops();
|
||||
final List<CommandLoopManager.CommandLoop> loops = CommandLoopManager.INSTANCE.commandLoops;
|
||||
|
||||
int id = 0;
|
||||
for (CommandLoopManager.CommandLoop loop : loops) {
|
||||
source.sendFeedback(Text.translatable("%s: %s (%s)", Text.literal(String.valueOf(id)), Text.literal(loop.command()), Text.literal(String.valueOf(loop.interval()))));
|
||||
source.sendFeedback(Text.translatable("%s: %s (%s)", Text.literal(String.valueOf(id)), Text.literal(loop.command), Text.literal(String.valueOf(loop.interval))));
|
||||
id++;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class CustomChatCommand {
|
|||
public static int enabled (CommandContext<FabricClientCommandSource> context) {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final boolean bool = getBool(context, "boolean");
|
||||
CustomChat.INSTANCE.enabled(bool);
|
||||
CustomChat.INSTANCE.enabled = bool;
|
||||
source.sendFeedback(Text.literal("Custom chat is now " + (bool ? "on" : "off")));
|
||||
|
||||
return Command.SINGLE_SUCCESS;
|
||||
|
@ -47,7 +47,7 @@ public class CustomChatCommand {
|
|||
public static int setFormat (CommandContext<FabricClientCommandSource> context) {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final String format = getString(context, "format");
|
||||
CustomChat.INSTANCE.format(format);
|
||||
CustomChat.INSTANCE.format = format;
|
||||
source.sendFeedback(Text.literal("Set the custom chat format to: " + format));
|
||||
|
||||
return Command.SINGLE_SUCCESS;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class FullBrightCommand {
|
|||
|
||||
final boolean bool = getBool(context, "boolean");
|
||||
|
||||
FullBright.enabled(bool);
|
||||
FullBright.enabled = bool;
|
||||
|
||||
source.sendFeedback(Text.literal("Fullbright is now " + (bool ? "enabled" : "disabled")));
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class LoopCrouchCommand {
|
|||
|
||||
final boolean enabled = getBool(context, "enabled");
|
||||
|
||||
LoopCrouch.INSTANCE.enabled(enabled);
|
||||
LoopCrouch.INSTANCE.enabled = enabled;
|
||||
|
||||
source.sendFeedback(Text.literal("Loop crouch is now " + (enabled ? "enabled" : "disabled")));
|
||||
|
||||
|
|
|
@ -125,10 +125,10 @@ public class MusicCommand {
|
|||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
|
||||
if (songPlayer.currentSong() == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
if (songPlayer.currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
||||
songPlayer.stopPlaying();
|
||||
songPlayer.songQueue().clear();
|
||||
songPlayer.songQueue.clear();
|
||||
source.sendFeedback(Text.literal("Stopped music playback").formatted(Formatting.GREEN));
|
||||
|
||||
return 1;
|
||||
|
@ -138,7 +138,7 @@ public class MusicCommand {
|
|||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
|
||||
if (songPlayer.currentSong() == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
if (songPlayer.currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
||||
songPlayer.stopPlaying();
|
||||
source.sendFeedback(Text.literal("Skipped the current song").formatted(Formatting.GREEN));
|
||||
|
@ -149,7 +149,7 @@ public class MusicCommand {
|
|||
public int pause (CommandContext<FabricClientCommandSource> context) throws CommandSyntaxException {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
final Song currentSong = songPlayer.currentSong();
|
||||
final Song currentSong = songPlayer.currentSong;
|
||||
|
||||
if (currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
||||
|
@ -240,7 +240,7 @@ public class MusicCommand {
|
|||
public int toggleLoop (CommandContext<FabricClientCommandSource> context) throws CommandSyntaxException {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
final Song currentSong = songPlayer.currentSong();
|
||||
final Song currentSong = songPlayer.currentSong;
|
||||
|
||||
if (currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
||||
|
@ -255,7 +255,7 @@ public class MusicCommand {
|
|||
public int loop (CommandContext<FabricClientCommandSource> context) throws CommandSyntaxException {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
final Song currentSong = songPlayer.currentSong();
|
||||
final Song currentSong = songPlayer.currentSong;
|
||||
final int count = getInteger(context, "count");
|
||||
|
||||
if (currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
@ -271,7 +271,7 @@ public class MusicCommand {
|
|||
public int gotoCommand (CommandContext<FabricClientCommandSource> context) throws CommandSyntaxException {
|
||||
final FabricClientCommandSource source = context.getSource();
|
||||
final SongPlayer songPlayer = SongPlayer.INSTANCE;
|
||||
final Song currentSong = songPlayer.currentSong();
|
||||
final Song currentSong = songPlayer.currentSong;
|
||||
final long millis = getLong(context, "timestamp");
|
||||
|
||||
if (currentSong == null) throw NO_SONG_IS_CURRENTLY_PLAYING.create();
|
||||
|
@ -290,7 +290,7 @@ public class MusicCommand {
|
|||
|
||||
final boolean enabled = getBool(context, "boolean");
|
||||
|
||||
SongPlayer.INSTANCE.useCore(enabled);
|
||||
SongPlayer.INSTANCE.useCore = enabled;
|
||||
|
||||
source.sendFeedback(Text.literal("Playing music using core is now " + (enabled ? "enabled" : "disabled")));
|
||||
|
||||
|
@ -302,7 +302,7 @@ public class MusicCommand {
|
|||
|
||||
final boolean enabled = getBool(context, "boolean");
|
||||
|
||||
SongPlayer.INSTANCE.actionbar(enabled);
|
||||
SongPlayer.INSTANCE.actionbar = enabled;
|
||||
|
||||
source.sendFeedback(Text.literal("Showing actionbar is now " + (enabled ? "enabled" : "disabled")));
|
||||
|
||||
|
@ -314,7 +314,7 @@ public class MusicCommand {
|
|||
|
||||
final float pitch = getFloat(context, "pitch");
|
||||
|
||||
SongPlayer.INSTANCE.pitch(pitch);
|
||||
SongPlayer.INSTANCE.pitch = pitch;
|
||||
|
||||
source.sendFeedback(
|
||||
Text.translatable(
|
||||
|
|
|
@ -56,7 +56,7 @@ public class RainbowNameCommand {
|
|||
|
||||
final String name = getString(context, "name");
|
||||
|
||||
RainbowName.INSTANCE.displayName(name);
|
||||
RainbowName.INSTANCE.displayName = name;
|
||||
|
||||
source.sendFeedback(Text.literal("Set the display name to: " + name));
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ public class SelfCareCommand {
|
|||
|
||||
switch (type) {
|
||||
case "op" -> {
|
||||
SelfCare.INSTANCE.opEnabled(bool);
|
||||
SelfCare.INSTANCE.opEnabled = bool;
|
||||
source.sendFeedback(Text.literal("The op self care is now " + (bool ? "enabled" : "disabled")));
|
||||
}
|
||||
case "gamemode" -> {
|
||||
SelfCare.INSTANCE.gamemodeEnabled(bool);
|
||||
SelfCare.INSTANCE.gamemodeEnabled = bool;
|
||||
source.sendFeedback(Text.literal("The gamemode self care is now " + (bool ? "enabled" : "disabled")));
|
||||
}
|
||||
case "cspy" -> {
|
||||
SelfCare.INSTANCE.cspyEnabled(bool);
|
||||
SelfCare.INSTANCE.cspyEnabled = bool;
|
||||
source.sendFeedback(Text.literal("The CommandSpy self care is now " + (bool ? "enabled" : "disabled")));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package land.chipmunk.chipmunkmod.data;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
// ? Am I reinventing the wheel here?
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class BlockArea {
|
||||
private BlockPos start;
|
||||
private BlockPos end;
|
||||
public BlockPos start;
|
||||
public BlockPos end;
|
||||
|
||||
public BlockArea (BlockPos start, BlockPos end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package land.chipmunk.chipmunkmod.data;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
public class CommandLoop {
|
||||
@Getter
|
||||
private String command;
|
||||
@Getter
|
||||
private long interval;
|
||||
|
||||
public CommandLoop (String command, long interval) {
|
||||
this.command = command;
|
||||
this.interval = interval;
|
||||
}
|
||||
}
|
|
@ -1,19 +1,22 @@
|
|||
package land.chipmunk.chipmunkmod.data;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerListS2CPacket;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.world.GameMode;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class MutablePlayerListEntry {
|
||||
private GameProfile profile;
|
||||
private GameMode gamemode;
|
||||
private int latency;
|
||||
private Text displayName;
|
||||
public GameProfile profile;
|
||||
public GameMode gamemode;
|
||||
public int latency;
|
||||
public Text displayName;
|
||||
|
||||
public MutablePlayerListEntry(GameProfile profile, GameMode gamemode, int latency, Text displayName) {
|
||||
this.profile = profile;
|
||||
this.gamemode = gamemode;
|
||||
this.latency = latency;
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public MutablePlayerListEntry (PlayerListS2CPacket.Entry entry) {
|
||||
this(entry.profile(), entry.gameMode(), entry.latency(), entry.displayName());
|
||||
|
|
|
@ -17,7 +17,7 @@ public class ChatHudMixin {
|
|||
@Inject(at = @At("HEAD"), method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;ILnet/minecraft/client/gui/hud/MessageIndicator;Z)V", cancellable = true)
|
||||
public void addMessage(Text message, MessageSignatureData signature, int ticks, MessageIndicator indicator, boolean refresh, CallbackInfo ci) {
|
||||
try {
|
||||
if (RainbowName.INSTANCE.enabled()) {
|
||||
if (RainbowName.INSTANCE.enabled) {
|
||||
if (message.getString().contains("Your nickname is now ") || message.getString().contains("Nickname changed.")) {
|
||||
ci.cancel();
|
||||
return;
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ClientPlayerEntityMixin {
|
|||
|
||||
final ClientWorld world = CLIENT.getNetworkHandler().getWorld();
|
||||
|
||||
final BlockPos origin = CommandCore.INSTANCE.origin();
|
||||
final BlockPos origin = CommandCore.INSTANCE.origin;
|
||||
if (origin == null) { CommandCore.INSTANCE.move(position); return; }
|
||||
final int distance = (int) Math.sqrt(new Vec2f(origin.getX() / 16, origin.getZ() / 16).distanceSquared(new Vec2f((int) position.getX() / 16, (int) position.getZ() / 16)));
|
||||
if (distance > world.getSimulationDistance()) CommandCore.INSTANCE.move(position);
|
||||
|
|
|
@ -34,10 +34,10 @@ public class KeyboardInputMixin extends Input {
|
|||
this.jumping = this.settings.jumpKey.isPressed();
|
||||
|
||||
// ohio code
|
||||
this.sneaking = LoopCrouch.INSTANCE.enabled() ?
|
||||
!LoopCrouch.INSTANCE.sneaking() :
|
||||
this.sneaking = LoopCrouch.INSTANCE.enabled ?
|
||||
!LoopCrouch.INSTANCE.sneaking :
|
||||
this.settings.sneakKey.isPressed();
|
||||
LoopCrouch.INSTANCE.sneaking(!LoopCrouch.INSTANCE.sneaking());
|
||||
LoopCrouch.INSTANCE.sneaking = !LoopCrouch.INSTANCE.sneaking;
|
||||
|
||||
if (slowDown) {
|
||||
this.movementSideways *= f;
|
||||
|
|
|
@ -11,6 +11,6 @@ import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
|
|||
public class LightmapTextureManagerMixin {
|
||||
@ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/texture/NativeImage;setColor(III)V"))
|
||||
private void update (Args args) {
|
||||
if (FullBright.enabled()) args.set(2, 0xFFFFFFFF);
|
||||
if (FullBright.enabled) args.set(2, 0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package land.chipmunk.chipmunkmod.modules;
|
|||
|
||||
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
||||
import land.chipmunk.chipmunkmod.data.BlockArea;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import net.minecraft.block.entity.CommandBlockBlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
|
@ -18,10 +18,10 @@ import java.util.concurrent.CompletableFuture;
|
|||
|
||||
public class CommandCore {
|
||||
private final MinecraftClient client;
|
||||
@Getter @Setter private boolean ready = false;
|
||||
@Getter @Setter private BlockPos origin;
|
||||
@Getter private BlockArea relativeArea;
|
||||
@Getter @Setter private BlockPos currentBlockRelative;
|
||||
public boolean ready = false;
|
||||
public BlockPos origin;
|
||||
public BlockArea relativeArea;
|
||||
public BlockPos currentBlockRelative;
|
||||
|
||||
public static CommandCore INSTANCE = new CommandCore(MinecraftClient.getInstance(), ChipmunkMod.CONFIG.core.relativeArea);
|
||||
|
||||
|
@ -46,17 +46,17 @@ public class CommandCore {
|
|||
((int) position.getZ() / 16) * 16
|
||||
);
|
||||
|
||||
if (currentBlockRelative == null) currentBlockRelative = new BlockPos(relativeArea.start());
|
||||
if (currentBlockRelative == null) currentBlockRelative = new BlockPos(relativeArea.start);
|
||||
refill();
|
||||
}
|
||||
|
||||
public void refill () {
|
||||
// final PositionManager position = client.position();
|
||||
final BlockPos relStart = relativeArea.start();
|
||||
final BlockPos relEnd = relativeArea.end();
|
||||
final BlockPos relStart = relativeArea.start;
|
||||
final BlockPos relEnd = relativeArea.end;
|
||||
|
||||
final String command = String.format(
|
||||
KaboomCheck.INSTANCE.isKaboom() ?
|
||||
KaboomCheck.INSTANCE.isKaboom ?
|
||||
"fill %s %s %s %s %s %s repeating_command_block replace" :
|
||||
"fill %s %s %s %s %s %s command_block",
|
||||
relStart.getX() + origin.getX(),
|
||||
|
@ -72,8 +72,8 @@ public class CommandCore {
|
|||
}
|
||||
|
||||
public void incrementCurrentBlock () {
|
||||
final BlockPos start = relativeArea.start();
|
||||
final BlockPos end = relativeArea.end();
|
||||
final BlockPos start = relativeArea.start;
|
||||
final BlockPos end = relativeArea.end;
|
||||
|
||||
int x = currentBlockRelative.getX();
|
||||
int y = currentBlockRelative.getY();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package land.chipmunk.chipmunkmod.modules;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Timer;
|
||||
|
@ -9,7 +9,7 @@ import java.util.TimerTask;
|
|||
|
||||
public class CommandLoopManager {
|
||||
private final CommandCore core;
|
||||
@Getter @Setter private List<CommandLoop> commandLoops = new ArrayList<>();
|
||||
public List<CommandLoop> commandLoops = new ArrayList<>();
|
||||
|
||||
public CommandLoopManager (CommandCore core) {
|
||||
this.core = core;
|
||||
|
@ -40,9 +40,9 @@ public class CommandLoopManager {
|
|||
public void cleanup () { this.clearLoops(); }
|
||||
|
||||
public static class CommandLoop {
|
||||
@Getter @Setter private CommandCore core;
|
||||
@Getter @Setter private String command;
|
||||
@Getter private long interval;
|
||||
public CommandCore core;
|
||||
public String command;
|
||||
public long interval;
|
||||
private Timer timer;
|
||||
|
||||
public CommandLoop (CommandCore core, String command, long interval) {
|
||||
|
|
|
@ -2,8 +2,8 @@ package land.chipmunk.chipmunkmod.modules;
|
|||
|
||||
import com.google.gson.JsonElement;
|
||||
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
|
@ -17,9 +17,9 @@ public class CustomChat {
|
|||
|
||||
public static final CustomChat INSTANCE = new CustomChat(MinecraftClient.getInstance());
|
||||
|
||||
@Getter @Setter private boolean enabled = true;
|
||||
public boolean enabled = true;
|
||||
|
||||
@Getter @Setter private String format;
|
||||
public String format;
|
||||
|
||||
public CustomChat (MinecraftClient client) {
|
||||
this.client = client;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package land.chipmunk.chipmunkmod.modules;
|
||||
|
||||
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
|
||||
public class FullBright {
|
||||
@Getter @Setter private static boolean enabled = ChipmunkMod.CONFIG.fullbright;
|
||||
public static boolean enabled = ChipmunkMod.CONFIG.fullbright;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package land.chipmunk.chipmunkmod.modules;
|
|||
|
||||
import land.chipmunk.chipmunkmod.listeners.Listener;
|
||||
import land.chipmunk.chipmunkmod.listeners.ListenerManager;
|
||||
import lombok.Getter;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
|
@ -18,7 +18,7 @@ public class KaboomCheck extends Listener {
|
|||
|
||||
public static final String SUBTITLE_START_TEXT = "Free OP";
|
||||
|
||||
@Getter private boolean isKaboom = false;
|
||||
public boolean isKaboom = false;
|
||||
|
||||
private boolean hasKaboomTitle = false;
|
||||
private boolean hasKaboomSubtitle = false;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package land.chipmunk.chipmunkmod.modules;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
|
||||
public class LoopCrouch {
|
||||
public static final LoopCrouch INSTANCE = new LoopCrouch();
|
||||
|
||||
@Getter @Setter private boolean enabled = false;
|
||||
public boolean enabled = false;
|
||||
|
||||
@Getter @Setter private boolean sneaking = false;
|
||||
public boolean sneaking = false;
|
||||
|
||||
public LoopCrouch () {
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class Players extends Listener {
|
|||
public final MutablePlayerListEntry getEntry (UUID uuid) {
|
||||
try {
|
||||
for (MutablePlayerListEntry candidate : list) {
|
||||
if (candidate.profile().getId().equals(uuid)) {
|
||||
if (candidate.profile.getId().equals(uuid)) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class Players extends Listener {
|
|||
|
||||
public final MutablePlayerListEntry getEntry (String username) {
|
||||
for (MutablePlayerListEntry candidate : list) {
|
||||
if (candidate.profile().getName().equals(username)) {
|
||||
if (candidate.profile.getName().equals(username)) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class Players extends Listener {
|
|||
|
||||
public final MutablePlayerListEntry getEntry (Text displayName) {
|
||||
for (MutablePlayerListEntry candidate : list) {
|
||||
if (candidate.displayName() != null && candidate.displayName().equals(displayName)) {
|
||||
if (candidate.displayName != null && candidate.displayName.equals(displayName)) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class Players extends Listener {
|
|||
try {
|
||||
final MutablePlayerListEntry duplicate = getEntry(newEntry);
|
||||
if (duplicate != null) {
|
||||
removeFromPlayerList(duplicate.profile().getId());
|
||||
removeFromPlayerList(duplicate.profile.getId());
|
||||
list.remove(duplicate);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class Players extends Listener {
|
|||
final MutablePlayerListEntry target = getEntry(newEntry);
|
||||
if (target == null) return;
|
||||
|
||||
target.gamemode(newEntry.gameMode());
|
||||
target.gamemode = newEntry.gameMode();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -139,14 +139,14 @@ public class Players extends Listener {
|
|||
final MutablePlayerListEntry target = getEntry(newEntry);
|
||||
if (target == null) return;
|
||||
|
||||
target.latency(newEntry.latency());
|
||||
target.latency = newEntry.latency();
|
||||
}
|
||||
|
||||
private void updateDisplayName (PlayerListS2CPacket.Entry newEntry) {
|
||||
final MutablePlayerListEntry target = getEntry(newEntry);
|
||||
if (target == null) return;
|
||||
|
||||
target.displayName(newEntry.displayName());
|
||||
target.displayName = newEntry.displayName();
|
||||
}
|
||||
|
||||
private void removePlayer (UUID uuid) {
|
||||
|
@ -166,7 +166,7 @@ public class Players extends Listener {
|
|||
|
||||
future.thenApply(packet -> {
|
||||
final Suggestions matches = packet.getSuggestions();
|
||||
final String username = target.profile().getName();
|
||||
final String username = target.profile.getName();
|
||||
|
||||
for (int i = 0; i < matches.getList().size(); i++) {
|
||||
final Suggestion suggestion = matches.getList().get(i);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package land.chipmunk.chipmunkmod.modules;
|
||||
|
||||
import land.chipmunk.chipmunkmod.util.ColorUtilities;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
|
@ -23,11 +23,11 @@ public class RainbowName {
|
|||
|
||||
private Timer timer = null;
|
||||
|
||||
@Getter @Setter private boolean enabled = false;
|
||||
public boolean enabled = false;
|
||||
|
||||
private String[] team;
|
||||
|
||||
@Getter @Setter private String displayName;
|
||||
public String displayName;
|
||||
|
||||
private int startHue = 0;
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ package land.chipmunk.chipmunkmod.modules;
|
|||
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
||||
import land.chipmunk.chipmunkmod.listeners.Listener;
|
||||
import land.chipmunk.chipmunkmod.listeners.ListenerManager;
|
||||
import lombok.Setter;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import lombok.Getter;
|
||||
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.Timer;
|
||||
|
@ -17,17 +17,17 @@ import static land.chipmunk.chipmunkmod.util.ServerUtilities.serverHasCommand;
|
|||
|
||||
public class SelfCare extends Listener {
|
||||
private final MinecraftClient client;
|
||||
@Getter private final long interval;
|
||||
@Getter private final long chatInterval;
|
||||
public final long interval;
|
||||
public final long chatInterval;
|
||||
|
||||
@Getter @Setter private boolean opEnabled = true;
|
||||
@Getter @Setter private boolean gamemodeEnabled = true;
|
||||
@Getter @Setter private boolean cspyEnabled = true;
|
||||
public boolean opEnabled = true;
|
||||
public boolean gamemodeEnabled = true;
|
||||
public boolean cspyEnabled = true;
|
||||
|
||||
@Getter @Setter private String skin;
|
||||
public String skin;
|
||||
|
||||
private boolean cspy = false;
|
||||
@Getter @Setter private boolean hasSkin = false;
|
||||
public boolean hasSkin = false;
|
||||
|
||||
private Timer timer = null;
|
||||
private Timer chatTimer = null;
|
||||
|
|
|
@ -8,8 +8,8 @@ import land.chipmunk.chipmunkmod.song.Song;
|
|||
import land.chipmunk.chipmunkmod.song.SongLoaderException;
|
||||
import land.chipmunk.chipmunkmod.song.SongLoaderThread;
|
||||
import land.chipmunk.chipmunkmod.util.MathUtilities;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
|
@ -42,16 +42,16 @@ public class SongPlayer {
|
|||
|
||||
public static final SongPlayer INSTANCE = new SongPlayer(MinecraftClient.getInstance());
|
||||
|
||||
@Getter @Setter private Song currentSong;
|
||||
@Getter @Setter private LinkedList<Song> songQueue = new LinkedList<>();
|
||||
@Getter @Setter private Timer playTimer;
|
||||
@Getter @Setter private SongLoaderThread loaderThread;
|
||||
public Song currentSong;
|
||||
public LinkedList<Song> songQueue = new LinkedList<>();
|
||||
public Timer playTimer;
|
||||
public SongLoaderThread loaderThread;
|
||||
private int ticksUntilPausedActionbar = 20;
|
||||
|
||||
@Getter @Setter private boolean useCore = true;
|
||||
@Getter @Setter private boolean actionbar = true;
|
||||
public boolean useCore = true;
|
||||
public boolean actionbar = true;
|
||||
|
||||
@Getter @Setter private float pitch = 0;
|
||||
public float pitch = 0;
|
||||
|
||||
private final MinecraftClient client;
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class SongPlayer {
|
|||
_loaderThread.start();
|
||||
loaderThread = _loaderThread;
|
||||
} catch (SongLoaderException e) {
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", e.message()).color(NamedTextColor.RED));
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", e.message).color(NamedTextColor.RED));
|
||||
loaderThread = null;
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class SongPlayer {
|
|||
_loaderThread.start();
|
||||
loaderThread = _loaderThread;
|
||||
} catch (SongLoaderException e) {
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", e.message()).color(NamedTextColor.RED));
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", e.message).color(NamedTextColor.RED));
|
||||
loaderThread = null;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class SongPlayer {
|
|||
|
||||
if (loaderThread != null && !loaderThread.isAlive()) {
|
||||
if (loaderThread.exception != null) {
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", loaderThread.exception.message()).color(NamedTextColor.RED));
|
||||
client.player.sendMessage(Component.translatable("Failed to load song: %s", loaderThread.exception.message).color(NamedTextColor.RED));
|
||||
} else {
|
||||
songQueue.add(loaderThread.song);
|
||||
client.player.sendMessage(Component.translatable("Added %s to the song queue", Component.empty().append(loaderThread.song.name).color(NamedTextColor.DARK_GREEN)).color(NamedTextColor.GREEN));
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
package land.chipmunk.chipmunkmod.song;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
public class Note implements Comparable<Note> {
|
||||
public Instrument instrument;
|
||||
public int pitch;
|
||||
public float volume;
|
||||
public long time;
|
||||
|
||||
public Note (Instrument instrument, int pitch, float volume, long time) {
|
||||
this.instrument = instrument;
|
||||
this.pitch = pitch;
|
||||
this.volume = volume;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Note other) {
|
||||
if (time < other.time) {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package land.chipmunk.chipmunkmod.song;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class SongLoaderException extends Exception {
|
||||
@Getter private final Text message;
|
||||
public final Text message;
|
||||
|
||||
public SongLoaderException (Text message) {
|
||||
super();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"depends": {
|
||||
"fabricloader": ">=0.14.11",
|
||||
"fabric-api": "*",
|
||||
"minecraft": ">1.19.3",
|
||||
"minecraft": ">1.20",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
|
|
Loading…
Reference in a new issue