Skip to content

Commit

Permalink
shits sick omg
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 13, 2024
1 parent bf50e6f commit e8d33f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/main/java/spigey/asteroide/mixin/WorldBorderMixin.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package spigey.asteroide.mixin;

import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.AutoRespawn;
import net.minecraft.entity.Entity;
import net.minecraft.network.NetworkState;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.border.WorldBorder;

import org.spongepowered.asm.mixin.*;
import spigey.asteroide.modules.BorderNoclipModule;

import static meteordevelopment.meteorclient.MeteorClient.mc;

@Mixin(WorldBorder.class)
public abstract class WorldBorderMixin {

@Shadow
private double damagePerBlock;

/**
* @author
* @reason
Expand All @@ -23,4 +24,16 @@ public abstract class WorldBorderMixin {
public boolean canCollide(Entity entity, Box box) {
return !Modules.get().get(BorderNoclipModule.class).isActive();
}
/**
* @author
* @reason
*/
@Overwrite
public double getDamagePerBlock(){
if(!Modules.get().get(BorderNoclipModule.class).isActive()) {
assert mc.world != null;
return mc.world.getWorldBorder().getDamagePerBlock();
}
return Modules.get().get(BorderNoclipModule.class).damage.get();
}
}
13 changes: 13 additions & 0 deletions src/main/java/spigey/asteroide/modules/BorderNoclipModule.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package spigey.asteroide.modules;

import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.Entity;
Expand All @@ -12,6 +16,15 @@ public class BorderNoclipModule extends Module {
public BorderNoclipModule() {
super(AsteroideAddon.CATEGORY, "border-noclip", "Removes the world border collision");
}
private final SettingGroup sgGeneral = settings.getDefaultGroup();
public final Setting<Double> damage = sgGeneral.add(new DoubleSetting.Builder()
.name("damage-per-block")
.description("Damage dealt per block when outside the world border")
.defaultValue(0)
.min(0)
.sliderMax(10)
.build()
);
}


0 comments on commit e8d33f6

Please sign in to comment.