1.21 update

update to 1.21, remove timer
This commit is contained in:
kawaiizenbo 2024-06-15 16:38:24 -07:00
parent c68631010d
commit 69b444c3c2
11 changed files with 36 additions and 31 deletions

View file

@ -34,9 +34,9 @@ public class DeathPos extends Command
}
ChatUtils.sendMsg(ColorUtils.reset + "You last died at: " +
ColorUtils.aqua + " X: " + ColorUtils.gray + pos.getPos().getX() +
ColorUtils.aqua + " Y: " + ColorUtils.gray + pos.getPos().getY() +
ColorUtils.aqua + " Z: " + ColorUtils.gray + pos.getPos().getZ()
ColorUtils.aqua + " X: " + ColorUtils.gray + pos.pos().getX() +
ColorUtils.aqua + " Y: " + ColorUtils.gray + pos.pos().getY() +
ColorUtils.aqua + " Z: " + ColorUtils.gray + pos.pos().getZ()
);
return SINGLE_SUCCESS;
});

View file

@ -11,18 +11,16 @@ import me.kawaiizenbo.moonlight.ui.HUDOverlay;
import me.kawaiizenbo.moonlight.ui.ModulesListOverlay;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
import net.minecraft.client.render.RenderTickCounter;
@Mixin(InGameHud.class)
public class InGameHudMixin {
@Shadow private int scaledWidth;
@Shadow private int scaledHeight;
@Inject(at = @At("TAIL"), method = "render")
public void onRender (DrawContext drawContext, float tickDelta, CallbackInfo info)
public void onRender (DrawContext drawContext, RenderTickCounter tickCounter, CallbackInfo info)
{
if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight);
if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight);
if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight());
if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight());
}
}

View file

@ -21,8 +21,8 @@ public class ModuleManager
new ModulesList(),
new ChatSpammer(),
new Rotation(),
new AutoJump(),
new Timer()
new AutoJump()
/*new Timer()*/
);
}

View file

@ -3,27 +3,36 @@ package me.kawaiizenbo.moonlight.module.modules;
import me.kawaiizenbo.moonlight.module.Category;
import me.kawaiizenbo.moonlight.module.Module;
import me.kawaiizenbo.moonlight.module.settings.DoubleSetting;
import net.minecraft.entity.attribute.EntityAttributes;
public class Step extends Module
{
DoubleSetting stepHeight = new DoubleSetting("Height", 1, 1, 10, 0);
double old = 0.6;
public Step()
{
super("Step", "Allows you to step up full blocks.", Category.MOVEMENT);
settings.add(stepHeight);
}
@Override
public void onEnable()
{
super.onEnable();
old = mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).getBaseValue();
}
@Override
public void tick()
{
mc.player.setStepHeight((float)stepHeight.value);
{
mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(stepHeight.value);
}
@Override
public void onDisable()
{
super.onDisable();
mc.player.setStepHeight(0.6f);
mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(old);
}
}

View file

@ -19,7 +19,7 @@ public class Timer extends Module
public void onEnable()
{
super.onEnable();
mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L, this::targetTickRate);
//mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L, this::targetTickRate);
current = speed.value;
}
@ -33,7 +33,7 @@ public class Timer extends Module
public void onDisable()
{
super.onDisable();
mc.renderTickCounter = new RenderTickCounter(20.0f, 0L, this::targetTickRate);
//mc.renderTickCounter = new RenderTickCounter(20.0f, 0L, this::targetTickRate);
}
public float targetTickRate(float millis)

View file

@ -26,7 +26,7 @@ public class CategoryPane
this.y = initialY;
this.collapsed = collapsed;
moduleButtons = new ArrayList<ModuleButton>();
icon = new Identifier("moonlight", category.name.toLowerCase());
icon = Identifier.of("moonlight", category.name.toLowerCase());
for (Module m : ModuleManager.INSTANCE.getModulesByCategory(category))
{
moduleButtons.add(new ModuleButton(m));

View file

@ -29,9 +29,9 @@
],
"depends": {
"fabricloader": ">=0.15.1",
"fabricloader": ">=0.15.11",
"fabric-api": "*",
"minecraft": "~1.20",
"java": ">=17"
"minecraft": "~1.21",
"java": ">=21"
}
}

View file

@ -1,4 +1,2 @@
accessWidener v1 named
accessible method net/minecraft/client/gui/DrawContext fillGradient (IIIIIII)V
accessible field net/minecraft/client/MinecraftClient renderTickCounter Lnet/minecraft/client/render/RenderTickCounter;
mutable field net/minecraft/client/MinecraftClient renderTickCounter Lnet/minecraft/client/render/RenderTickCounter;