add config system and window dragging
This commit is contained in:
parent
6e584de0e6
commit
a18cb2a137
22 changed files with 354 additions and 104 deletions
|
@ -7,6 +7,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
|
||||
import me.kawaiizenbo.moonlight.module.ModuleManager;
|
||||
import me.kawaiizenbo.moonlight.module.Module_;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.entity.MovementType;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -14,12 +15,30 @@ import net.minecraft.util.math.Vec3d;
|
|||
@Mixin(ClientPlayerEntity.class)
|
||||
public class ClientPlayerEntityMixin
|
||||
{
|
||||
@Inject(method = "move", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onMotion(MovementType type, Vec3d movement, CallbackInfo ci)
|
||||
@Inject(method = "move", at = @At(value = "TAIL"), cancellable = true)
|
||||
public void onMove(MovementType type, Vec3d movement, CallbackInfo ci)
|
||||
{
|
||||
for (Module_ m : ModuleManager.INSTANCE.getEnabledModules())
|
||||
{
|
||||
m.onMotion(type, movement);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "tick", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onTick(CallbackInfo ci)
|
||||
{
|
||||
for (Module_ m : ModuleManager.INSTANCE.getEnabledModules())
|
||||
{
|
||||
if (MinecraftClient.getInstance().player != null) m.tick();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At(value = "TAIL"), cancellable = true)
|
||||
public void onInit(CallbackInfo ci)
|
||||
{
|
||||
for (Module_ m : ModuleManager.INSTANCE.getEnabledModules())
|
||||
{
|
||||
m.onEnable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue