Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
[0.2.0] Moved modules to Phobot, Translating GameProfile when connect…
Browse files Browse the repository at this point in the history
…ing through PingBypass
  • Loading branch information
3arthqu4ke committed Mar 7, 2024
1 parent 50ee4ed commit 67a72e8
Show file tree
Hide file tree
Showing 40 changed files with 222 additions and 532 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ subprojects {
}

configurations {
lwjglAgent
lwjglAgent.extendsFrom runtimeOnly

// see pb-api build.gradle, these need to be on the classpath when building our JavaDoc
Expand Down Expand Up @@ -433,7 +434,7 @@ afterEvaluate {
? ''
: System.getenv('GITHUB_RUN_NUMBER') != null && System.getenv('GITHUB_SHA') != null
? "-${System.getenv('GITHUB_RUN_NUMBER')}-${System.getenv('GITHUB_SHA').substring(0, 7)}"
: '-local'
: ''
publishing {
publications {
"$project.name"(MavenPublication) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.concurrent.atomic.AtomicBoolean;

/**
* Launches {@link Side#SERVER} and/or {@link Side#CLIENT} if their jar is in the "pingbypass/plugins" folder.
* Launches {@link Side#SERVER} and/or {@link Side#CLIENT}, or any other Side, if their jar is in the "pingbypass/plugins" folder.
*/
@Slf4j
public class SideLaunchingPlugin implements SimpleMixinConfigPlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import me.earth.pingbypass.api.event.loop.GameloopEvent;
import me.earth.pingbypass.api.event.loop.TickEvent;
import me.earth.pingbypass.api.mixins.resource.IPackRepository;
import me.earth.pingbypass.api.module.misc.AutoRespawn;
import me.earth.pingbypass.api.platform.Platform;
import me.earth.pingbypass.api.platform.PlatformProvider;
import me.earth.pingbypass.api.resource.PackRepositoryHelper;
import me.earth.pingbypass.api.util.mixin.MixinHelper;
import net.minecraft.CrashReport;
Expand Down Expand Up @@ -61,7 +62,9 @@ private int runTickHook(int i) {
target = "Lnet/minecraft/client/Minecraft;resourcePackRepository:Lnet/minecraft/server/packs/repository/PackRepository;"
/* shift = At.Shift.AFTER is done by the Injection point, because shifting would wrap it */))
private void resourcePackRepositoryHook(GameConfig config, CallbackInfo ci) {
PackRepositoryHelper.addPingBypassRepositorySource(((IPackRepository) resourcePackRepository));
if (PlatformProvider.getInstance().getCurrent().equals(Platform.FABRIC)) {
PackRepositoryHelper.addPingBypassRepositorySource(((IPackRepository) resourcePackRepository));
}
}

@Inject(method = "tick", at = @At("HEAD"))
Expand All @@ -85,11 +88,6 @@ private void setScreenHook(Screen screen, CallbackInfo ci) {
MixinHelper.hook(new GuiScreenEvent<>(screen), screen == null ? null : screen.getClass(), ci);
}

@Inject(method = "setScreen", at = @At(value = "NEW", target = "(Lnet/minecraft/network/chat/Component;Z)Lnet/minecraft/client/gui/screens/DeathScreen;"), cancellable = true)
private void deathScreenHook(Screen screen, CallbackInfo ci) {
MixinHelper.hook(new AutoRespawn.DeathScreenEvent(), ci);
}

@Inject(method = "setScreen", at = @At("RETURN"))
private void setScreenHookReturn(Screen screen, CallbackInfo ci) {
PingBypassApi.getEventBus().post(new GuiScreenEvent.Post<>(screen), screen == null ? null : screen.getClass());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package me.earth.pingbypass.api.mixins.entity;

import net.minecraft.client.multiplayer.PlayerInfo;
import net.minecraft.client.player.AbstractClientPlayer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;

@Mixin(AbstractClientPlayer.class)
public interface IAbstractClientPlayer {
@Invoker("getPlayerInfo")
PlayerInfo invokeGetPlayerInfo();

}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import me.earth.pingbypass.PingBypassApi;
import me.earth.pingbypass.api.event.loop.LocalPlayerUpdateEvent;
import me.earth.pingbypass.api.module.movement.Velocity;
import me.earth.pingbypass.api.util.mixin.MixinHelper;
import net.minecraft.client.player.LocalPlayer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -22,9 +20,4 @@ private void tickHook(CallbackInfo ci) {
PingBypassApi.getEventBus().post(new LocalPlayerUpdateEvent(LocalPlayer.class.cast(this)));
}

@Inject(method = "moveTowardsClosestSpace", at = @At("HEAD"), cancellable = true)
private void moveTowardsClosestSpaceHook(double d, double e, CallbackInfo ci) {
MixinHelper.hook(new Velocity.PushOutOfBlocks(), ci);
}

}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
package me.earth.pingbypass.api.module;

import me.earth.pingbypass.PingBypass;
import me.earth.pingbypass.api.module.ModuleManager;
import me.earth.pingbypass.api.module.client.Notifications;
import me.earth.pingbypass.api.module.misc.AutoRespawn;
import me.earth.pingbypass.api.module.misc.Potions;
import me.earth.pingbypass.api.module.movement.Velocity;
import me.earth.pingbypass.api.module.render.Fullbright;
import me.earth.pingbypass.api.module.render.NoRender;

public interface CommonModuleInitializer {
default void registerCommonModules(PingBypass pb) {
ModuleManager modules = pb.getModuleManager();

modules.register(new Notifications(pb));

modules.register(new AutoRespawn(pb));
modules.register(new Potions(pb));

modules.register(new Velocity(pb));

modules.register(new Fullbright(pb));
modules.register(new NoRender(pb));
}

}
Loading

0 comments on commit 67a72e8

Please sign in to comment.