chore: renamed BoSCoVicino to Boscovicino

This commit is contained in:
zaaarf 2023-03-01 12:41:53 +01:00
parent f4889c1ce2
commit 8a3cc80809
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
23 changed files with 96 additions and 152 deletions

View file

@ -1,5 +1,7 @@
package ftbsc.bscv; package ftbsc.bscv;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import ftbsc.bscv.api.IModule; import ftbsc.bscv.api.IModule;
import ftbsc.bscv.system.ModManager; import ftbsc.bscv.system.ModManager;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
@ -23,13 +25,10 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@Mod("bscv") @Mod("bscv")
public class BoSCoVicino implements ICommons { public class Boscovicino implements ICommons {
public static String MOD_ID = "bscv"; public static String MOD_ID = "bscv";
public static final Logger LOGGER = LogManager.getLogger(); public static final Logger LOGGER = LogManager.getLogger();
@ -40,16 +39,16 @@ public class BoSCoVicino implements ICommons {
public static ForgeConfigSpec spec; public static ForgeConfigSpec spec;
public BoSCoVicino() { public Boscovicino() {
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup);
ForgeConfigSpec.Builder cfg = new ForgeConfigSpec.Builder(); ForgeConfigSpec.Builder cfg = new ForgeConfigSpec.Builder();
CommandDispatcher<CommandSource> dp = this.dispatcher; CommandDispatcher<CommandSource> dp = this.dispatcher;
BoSCoVicino.modManager = new ModManager(cfg, dp); Boscovicino.modManager = new ModManager(cfg, dp);
BoSCoVicino.modManager.load(); Boscovicino.modManager.load();
BoSCoVicino.spec = cfg.build(); Boscovicino.spec = cfg.build();
// register config handler // register config handler
ModLoadingContext.get().registerConfig(Type.CLIENT, spec, "bscv.toml"); ModLoadingContext.get().registerConfig(Type.CLIENT, spec, "bscv.toml");

View file

@ -2,15 +2,14 @@ package ftbsc.bscv.modules;
import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.BoolArgumentType; import com.mojang.brigadier.arguments.BoolArgumentType;
import ftbsc.bscv.Boscovicino;
import ftbsc.bscv.BoSCoVicino;
import ftbsc.bscv.api.IModule; import ftbsc.bscv.api.IModule;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import static ftbsc.bscv.BoSCoVicino.log; import static ftbsc.bscv.Boscovicino.log;
public abstract class AbstractModule implements IModule { public abstract class AbstractModule implements IModule {
protected ForgeConfigSpec.ConfigValue<Boolean> enabled; protected ForgeConfigSpec.ConfigValue<Boolean> enabled;
@ -28,12 +27,12 @@ public abstract class AbstractModule implements IModule {
@Override @Override
public ForgeConfigSpec.Builder getConfigBuilder() { public ForgeConfigSpec.Builder getConfigBuilder() {
return BoSCoVicino.modManager.getCfgBuilder(); return Boscovicino.modManager.getCfgBuilder();
} }
@Override @Override
public CommandDispatcher<CommandSource> getDispatcher() { public CommandDispatcher<CommandSource> getDispatcher() {
return BoSCoVicino.modManager.getDispatcher(); return Boscovicino.modManager.getDispatcher();
} }
public AbstractModule() { public AbstractModule() {

View file

@ -1,5 +1,6 @@
package ftbsc.bscv.modules; package ftbsc.bscv.modules;
import ftbsc.bscv.Boscovicino;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.util.InputMappings; import net.minecraft.client.util.InputMappings;
import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.client.event.InputEvent;
@ -7,8 +8,6 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.ClientRegistry;
import ftbsc.bscv.BoSCoVicino;
// TODO rename // TODO rename
public abstract class QuickModule extends AbstractModule { public abstract class QuickModule extends AbstractModule {
@ -78,11 +77,11 @@ public abstract class QuickModule extends AbstractModule {
} }
private static String key_name(String name) { private static String key_name(String name) {
return String.format("key.%s.%s", BoSCoVicino.MOD_ID, name); return String.format("key.%s.%s", Boscovicino.MOD_ID, name);
} }
private static String key_category() { private static String key_category() {
return String.format("key.category.%s", BoSCoVicino.MOD_ID); return String.format("key.category.%s", Boscovicino.MOD_ID);
} }
} }

View file

@ -1,6 +1,8 @@
package ftbsc.bscv.modules.defense; package ftbsc.bscv.modules.defense;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.QuickModule; import ftbsc.bscv.modules.QuickModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -9,8 +11,6 @@ import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Phase;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class Aura extends QuickModule implements ICommons { public class Aura extends QuickModule implements ICommons {

View file

@ -1,7 +1,9 @@
package ftbsc.bscv.modules.hud; package ftbsc.bscv.modules.hud;
import ftbsc.bscv.BoSCoVicino; import com.google.auto.service.AutoService;
import ftbsc.bscv.Boscovicino;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.api.IModule; import ftbsc.bscv.api.IModule;
import ftbsc.bscv.modules.HudModule; import ftbsc.bscv.modules.HudModule;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent;
@ -9,8 +11,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import static ftbsc.bscv.tools.Text.TextBuilder; import static ftbsc.bscv.tools.Text.TextBuilder;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class ActiveModules extends HudModule implements ICommons { public class ActiveModules extends HudModule implements ICommons {
@ -18,7 +18,7 @@ public class ActiveModules extends HudModule implements ICommons {
public void onRenderOverlay(RenderGameOverlayEvent event) { public void onRenderOverlay(RenderGameOverlayEvent event) {
if (event.getType() == ElementType.TEXT) { if (event.getType() == ElementType.TEXT) {
int offset = 0; int offset = 0;
for (IModule m : BoSCoVicino.modManager.mods) { for (IModule m : Boscovicino.modManager.mods) {
if (m.isEnabled() && !m.getGroup().equalsIgnoreCase("HUD")) { if (m.isEnabled() && !m.getGroup().equalsIgnoreCase("HUD")) {
TextBuilder() TextBuilder()
.txt(String.format("%s <", m.getName())) .txt(String.format("%s <", m.getName()))

View file

@ -1,5 +1,9 @@
package ftbsc.bscv.modules.hud; package ftbsc.bscv.modules.hud;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.HudModule;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
@ -7,12 +11,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import static ftbsc.bscv.tools.Text.TextBuilder; import static ftbsc.bscv.tools.Text.TextBuilder;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons;
import ftbsc.bscv.modules.HudModule;
import ftbsc.bscv.api.ILoadable;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class Coordinates extends HudModule implements ICommons { public class Coordinates extends HudModule implements ICommons {
@SubscribeEvent @SubscribeEvent

View file

@ -1,18 +1,10 @@
package ftbsc.bscv.modules.hud; package ftbsc.bscv.modules.hud;
import static ftbsc.bscv.tools.Text.TextBuilder; import com.google.auto.service.AutoService;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import com.mojang.brigadier.CommandDispatcher;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.HudModule; import ftbsc.bscv.modules.HudModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.text.Color; import net.minecraft.util.text.Color;
import net.minecraft.util.text.Style; import net.minecraft.util.text.Style;
@ -21,8 +13,13 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService; import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import static ftbsc.bscv.tools.Text.TextBuilder;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class EntityList extends HudModule implements ICommons { public class EntityList extends HudModule implements ICommons {

View file

@ -1,16 +1,10 @@
package ftbsc.bscv.modules.hud; package ftbsc.bscv.modules.hud;
import static ftbsc.bscv.tools.Text.TextBuilder; import com.google.auto.service.AutoService;
import java.util.ArrayDeque;
import com.mojang.brigadier.CommandDispatcher;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.HudModule; import ftbsc.bscv.modules.HudModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandSource;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.text.Color; import net.minecraft.util.text.Color;
import net.minecraft.util.text.Style; import net.minecraft.util.text.Style;
@ -20,8 +14,10 @@ import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Phase;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService; import java.util.ArrayDeque;
import static ftbsc.bscv.tools.Text.TextBuilder;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class InfoDisplay extends HudModule implements ICommons { public class InfoDisplay extends HudModule implements ICommons {

View file

@ -1,20 +1,16 @@
package ftbsc.bscv.modules.hud; package ftbsc.bscv.modules.hud;
import static ftbsc.bscv.tools.Text.TextBuilder; import com.google.auto.service.AutoService;
import com.mojang.brigadier.CommandDispatcher;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.HudModule; import ftbsc.bscv.modules.HudModule;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService; import static ftbsc.bscv.tools.Text.TextBuilder;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class PlayerList extends HudModule implements ICommons { public class PlayerList extends HudModule implements ICommons {

View file

@ -1,21 +1,18 @@
package ftbsc.bscv.modules.motion; package ftbsc.bscv.modules.motion;
import com.mojang.brigadier.CommandDispatcher; import com.google.auto.service.AutoService;
import ftbsc.bscv.Boscovicino;
import ftbsc.bscv.BoSCoVicino;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.QuickModule; import ftbsc.bscv.modules.QuickModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.command.CommandSource;
import net.minecraft.network.play.client.CPlayerPacket; import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Phase;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class VanillaFlight extends QuickModule implements ICommons { public class VanillaFlight extends QuickModule implements ICommons {
@ -88,7 +85,7 @@ public class VanillaFlight extends QuickModule implements ICommons {
this.tick = ( this.tick + 1 ) % this.antikick_cycle.get(); this.tick = ( this.tick + 1 ) % this.antikick_cycle.get();
if (this.tick == 0) { if (this.tick == 0) {
Vector3d pos = MC.player.position(); Vector3d pos = MC.player.position();
BoSCoVicino.log("[*] antikick"); Boscovicino.log("[*] antikick");
MC.player.connection.send( MC.player.connection.send(
new CPlayerPacket.PositionPacket(pos.x, pos.y - this.antikick_magnitude.get(), pos.z, false) new CPlayerPacket.PositionPacket(pos.x, pos.y - this.antikick_magnitude.get(), pos.z, false)
); );
@ -105,7 +102,7 @@ public class VanillaFlight extends QuickModule implements ICommons {
if (MC.player != null) { if (MC.player != null) {
this.couldFlyBefore = MC.player.abilities.mayfly; this.couldFlyBefore = MC.player.abilities.mayfly;
this.flyingSpeedBefore = MC.player.abilities.getFlyingSpeed(); this.flyingSpeedBefore = MC.player.abilities.getFlyingSpeed();
BoSCoVicino.log(String.format("Flying speed before = %f", this.flyingSpeedBefore)); Boscovicino.log(String.format("Flying speed before = %f", this.flyingSpeedBefore));
} }
} }

View file

@ -1,16 +1,16 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.events.PacketEvent; import ftbsc.bscv.events.PacketEvent;
import ftbsc.bscv.modules.AbstractModule; import ftbsc.bscv.modules.AbstractModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.network.play.client.CEntityActionPacket; import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CEntityActionPacket.Action; import net.minecraft.network.play.client.CEntityActionPacket.Action;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class AntiHunger extends AbstractModule implements ICommons { public class AntiHunger extends AbstractModule implements ICommons {

View file

@ -1,19 +1,16 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import com.mojang.brigadier.CommandDispatcher; import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.events.PacketEvent; import ftbsc.bscv.events.PacketEvent;
import ftbsc.bscv.modules.AbstractModule; import ftbsc.bscv.modules.AbstractModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.command.CommandSource;
import net.minecraft.network.play.server.SDisconnectPacket; import net.minecraft.network.play.server.SDisconnectPacket;
import net.minecraft.network.play.server.SUpdateHealthPacket; import net.minecraft.network.play.server.SUpdateHealthPacket;
import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class AutoDisconnect extends AbstractModule implements ICommons { public class AutoDisconnect extends AbstractModule implements ICommons {

View file

@ -1,6 +1,8 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.events.PacketEvent; import ftbsc.bscv.events.PacketEvent;
import ftbsc.bscv.modules.AbstractModule; import ftbsc.bscv.modules.AbstractModule;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
@ -10,8 +12,6 @@ import net.minecraft.util.Hand;
import net.minecraft.util.SoundEvents; import net.minecraft.util.SoundEvents;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class AutoFish extends AbstractModule implements ICommons { public class AutoFish extends AbstractModule implements ICommons {

View file

@ -1,8 +1,8 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import java.util.List; import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.AbstractModule; import ftbsc.bscv.modules.AbstractModule;
import ftbsc.bscv.tools.Inventory; import ftbsc.bscv.tools.Inventory;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
@ -13,8 +13,8 @@ import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService; import java.util.List;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class AutoTool extends AbstractModule implements ICommons { public class AutoTool extends AbstractModule implements ICommons {

View file

@ -1,20 +1,15 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import static ftbsc.bscv.BoSCoVicino.log; import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons;
import java.lang.reflect.Field; import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.QuickModule;
import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.command.CommandSource;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.modules.QuickModule; import java.lang.reflect.Field;
import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable; import static ftbsc.bscv.Boscovicino.log;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class FastInteract extends QuickModule implements ICommons { public class FastInteract extends QuickModule implements ICommons {

View file

@ -1,24 +1,21 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import com.mojang.brigadier.CommandDispatcher; import com.google.auto.service.AutoService;
import ftbsc.bscv.Boscovicino;
import ftbsc.bscv.BoSCoVicino;
import ftbsc.bscv.events.PacketEvent;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.events.PacketEvent;
import ftbsc.bscv.modules.QuickModule; import ftbsc.bscv.modules.QuickModule;
import ftbsc.bscv.tools.Keyboard; import ftbsc.bscv.tools.Keyboard;
import ftbsc.bscv.tools.Setting; import ftbsc.bscv.tools.Setting;
import net.minecraft.client.entity.player.RemoteClientPlayerEntity; import net.minecraft.client.entity.player.RemoteClientPlayerEntity;
import net.minecraft.client.network.play.NetworkPlayerInfo; import net.minecraft.client.network.play.NetworkPlayerInfo;
import net.minecraft.command.CommandSource;
import net.minecraft.network.play.client.CPlayerPacket; import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.GameType; import net.minecraft.world.GameType;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class Freecam extends QuickModule implements ICommons { public class Freecam extends QuickModule implements ICommons {
@ -64,7 +61,7 @@ public class Freecam extends QuickModule implements ICommons {
if (MC.player == null) return; if (MC.player == null) return;
if (event.outgoing && event.packet instanceof CPlayerPacket) { // TODO must ignore more packets than just this if (event.outgoing && event.packet instanceof CPlayerPacket) { // TODO must ignore more packets than just this
if (this.log.get()) { if (this.log.get()) {
BoSCoVicino.log(String.format("[X] %s", event.packet.getClass().getName())); Boscovicino.log(String.format("[X] %s", event.packet.getClass().getName()));
} }
event.setCanceled(true); event.setCanceled(true);
} }
@ -82,7 +79,7 @@ public class Freecam extends QuickModule implements ICommons {
@Override @Override
protected void onEnabled() { protected void onEnabled() {
if (MC.player == null) { if (MC.player == null) {
BoSCoVicino.log("[!] Can only enable freecam while in-game"); Boscovicino.log("[!] Can only enable freecam while in-game");
this.disable(); this.disable();
} }

View file

@ -1,11 +1,11 @@
package ftbsc.bscv.modules.self; package ftbsc.bscv.modules.self;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.AbstractModule; import ftbsc.bscv.modules.AbstractModule;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class PortalGui extends AbstractModule implements ICommons { public class PortalGui extends AbstractModule implements ICommons {

View file

@ -1,6 +1,8 @@
package ftbsc.bscv.modules.vision; package ftbsc.bscv.modules.vision;
import com.google.auto.service.AutoService;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.api.ILoadable;
import ftbsc.bscv.modules.QuickModule; import ftbsc.bscv.modules.QuickModule;
import net.minecraft.potion.Effect; import net.minecraft.potion.Effect;
import net.minecraft.potion.EffectInstance; import net.minecraft.potion.EffectInstance;
@ -8,8 +10,6 @@ import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import ftbsc.bscv.api.ILoadable;
import com.google.auto.service.AutoService;
@AutoService(ILoadable.class) @AutoService(ILoadable.class)
public class Fullbright extends QuickModule implements ICommons { public class Fullbright extends QuickModule implements ICommons {

View file

@ -1,25 +1,16 @@
package ftbsc.bscv.patches; package ftbsc.bscv.patches;
import ftbsc.lll.processor.annotations.Injector;
import ftbsc.lll.processor.annotations.Patch;
import ftbsc.lll.processor.annotations.Target;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.BoatEntity;
import net.minecraftforge.common.MinecraftForge;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.VarInsnNode;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import ftbsc.bscv.events.BoatEvent; import ftbsc.bscv.events.BoatEvent;
import ftbsc.lll.IInjector; import ftbsc.lll.processor.annotations.Injector;
import ftbsc.lll.processor.annotations.Patch;
import ftbsc.lll.processor.annotations.Target;
import ftbsc.lll.tools.InsnSequence; import ftbsc.lll.tools.InsnSequence;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.BoatEntity;
import net.minecraftforge.common.MinecraftForge;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.*;
public class BoatPatch { public class BoatPatch {

View file

@ -1,29 +1,18 @@
package ftbsc.bscv.patches; package ftbsc.bscv.patches;
import ftbsc.bscv.events.PacketEvent;
import ftbsc.lll.processor.annotations.Injector; import ftbsc.lll.processor.annotations.Injector;
import ftbsc.lll.processor.annotations.Patch; import ftbsc.lll.processor.annotations.Patch;
import ftbsc.lll.processor.annotations.Target; import ftbsc.lll.processor.annotations.Target;
import ftbsc.lll.tools.InsnSequence;
import ftbsc.lll.tools.PatternMatcher;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.GenericFutureListener;
import net.minecraft.network.IPacket; import net.minecraft.network.IPacket;
import net.minecraft.network.NetworkManager; import net.minecraft.network.NetworkManager;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import org.objectweb.asm.Opcodes; import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.*;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.VarInsnNode;
import ftbsc.bscv.events.PacketEvent;
import ftbsc.lll.IInjector;
import ftbsc.lll.tools.DescriptorBuilder;
import ftbsc.lll.tools.InsnSequence;
import ftbsc.lll.tools.PatternMatcher;
public class PacketPatch { public class PacketPatch {

View file

@ -1,8 +1,5 @@
package ftbsc.bscv.tools; package ftbsc.bscv.tools;
import java.util.Collection;
import java.util.List;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.ai.attributes.AttributeModifier;
@ -11,6 +8,9 @@ import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.inventory.container.Slot; import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import java.util.Collection;
import java.util.List;
public class Inventory implements ICommons { public class Inventory implements ICommons {
public static final int HOTBAR_SIZE = 9; public static final int HOTBAR_SIZE = 9;

View file

@ -1,20 +1,15 @@
package ftbsc.bscv.tools; package ftbsc.bscv.tools;
import static ftbsc.bscv.BoSCoVicino.log; import com.mojang.brigadier.arguments.*;
import java.util.Optional;
import com.mojang.brigadier.arguments.ArgumentType;
import com.mojang.brigadier.arguments.BoolArgumentType;
import com.mojang.brigadier.arguments.DoubleArgumentType;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import ftbsc.bscv.api.IModule; import ftbsc.bscv.api.IModule;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.server.command.EnumArgument; import net.minecraftforge.server.command.EnumArgument;
import java.util.Optional;
import static ftbsc.bscv.Boscovicino.log;
public abstract class Setting<T> { public abstract class Setting<T> {
protected Optional<String> name; protected Optional<String> name;

View file

@ -2,7 +2,6 @@ package ftbsc.bscv.tools;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import ftbsc.bscv.ICommons; import ftbsc.bscv.ICommons;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;