This commit is contained in:
Cloudburst
2021-07-13 20:02:54 +02:00
parent e71568d489
commit 166d0886be
4 changed files with 0 additions and 151 deletions

View File

@@ -37,9 +37,7 @@ Also includes unmerged PRs.
- ColorSigns - ColorSigns
- Confuse - Confuse
- Coord Logger (World events from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/impl/misc/CoordFinder.java)) - Coord Logger (World events from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/impl/misc/CoordFinder.java))
- Gravity (Ported from [Cornos](https://github.com/cornos/Cornos/blob/master/src/main/java/me/zeroX150/cornos/features/module/impl/movement/MoonGravity.java))
- InteractionMenu (Ported from [BleachHack](https://github.com/BleachDrinker420/BleachHack/pull/211)) - InteractionMenu (Ported from [BleachHack](https://github.com/BleachDrinker420/BleachHack/pull/211))
- Glide
- Lavacast - Lavacast
- NewChunks (Ported from [BleackHack](https://github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.17/src/main/java/bleach/hack/module/mods/NewChunks.java)) - NewChunks (Ported from [BleackHack](https://github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.17/src/main/java/bleach/hack/module/mods/NewChunks.java))
- ObsidianFarm (Taken from [Meteor ObsidianFarm Addon](https://github.com/VoidCyborg/meteor-obsidian-farm)) - ObsidianFarm (Taken from [Meteor ObsidianFarm Addon](https://github.com/VoidCyborg/meteor-obsidian-farm))

View File

@@ -53,9 +53,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new ColorSigns()); modules.add(new ColorSigns());
modules.add(new Confuse()); modules.add(new Confuse());
modules.add(new CoordLogger()); modules.add(new CoordLogger());
modules.add(new Gravity());
modules.add(new InteractionMenu()); modules.add(new InteractionMenu());
modules.add(new Glide());
modules.add(new Lavacast()); modules.add(new Lavacast());
modules.add(new NewChunks()); modules.add(new NewChunks());
modules.add(new ObsidianFarm()); modules.add(new ObsidianFarm());

View File

@@ -1,109 +0,0 @@
package cloudburst.rejects.modules;
import java.util.ArrayList;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import cloudburst.rejects.MeteorRejectsAddon;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
public class Glide extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
private final Setting<Double> fallSpeed = sgGeneral.add(new DoubleSetting.Builder()
.name("fall-speed")
.description("Fall Speed")
.defaultValue(0.125)
.min(0.005)
.sliderMax(0.25)
.build()
);
private final Setting<Double> moveSpeed = sgGeneral.add(new DoubleSetting.Builder()
.name("move-speed")
.description("Horizontal movement factor.")
.defaultValue(1.2)
.min(0.75)
.sliderMax(5)
.build()
);
private final Setting<Double> minHeight = sgGeneral.add(new DoubleSetting.Builder()
.name("min-height")
.description("Won't glide when you are too close to the ground.")
.defaultValue(0)
.min(0)
.sliderMax(2)
.build()
);
public Glide() {
super(MeteorRejectsAddon.CATEGORY, "glide", "Makes you glide down slowly when falling.");
}
@EventHandler
private void onTick(TickEvent.Pre event) {
Vec3d v = mc.player.getVelocity();
if(mc.player.isOnGround() || mc.player.isTouchingWater() || mc.player.isInLava()
|| mc.player.isClimbing() || v.y >= 0)
return;
if(minHeight.get() > 0)
{
Box box = mc.player.getBoundingBox();
box = box.union(box.offset(0, -minHeight.get(), 0));
if(!mc.world.isSpaceEmpty(box))
return;
BlockPos min =
new BlockPos(new Vec3d(box.minX, box.minY, box.minZ));
BlockPos max =
new BlockPos(new Vec3d(box.maxX, box.maxY, box.maxZ));
Stream<BlockPos> stream = StreamSupport
.stream(getAllInBox(min, max).spliterator(), true);
// manual collision check, since liquids don't have bounding boxes
if(stream.map(this::getState).map(BlockState::getMaterial)
.anyMatch(Material::isLiquid))
return;
}
mc.player.setVelocity(v.x, Math.max(v.y, -fallSpeed.get()), v.z);
mc.player.flyingSpeed *= moveSpeed.get();
}
public static ArrayList<BlockPos> getAllInBox(BlockPos from, BlockPos to)
{
ArrayList<BlockPos> blocks = new ArrayList<>();
BlockPos min = new BlockPos(Math.min(from.getX(), to.getX()),
Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
BlockPos max = new BlockPos(Math.max(from.getX(), to.getX()),
Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
for(int x = min.getX(); x <= max.getX(); x++)
for(int y = min.getY(); y <= max.getY(); y++)
for(int z = min.getZ(); z <= max.getZ(); z++)
blocks.add(new BlockPos(x, y, z));
return blocks;
}
public BlockState getState(BlockPos pos)
{
return mc.world.getBlockState(pos);
}
}

View File

@@ -1,38 +0,0 @@
package cloudburst.rejects.modules;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.mixininterface.IVec3d;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import net.minecraft.util.math.Vec3d;
import cloudburst.rejects.MeteorRejectsAddon;
public class Gravity extends Module {
public Gravity() {
super(MeteorRejectsAddon.CATEGORY, "gravity", "Modifies gravity.");
}
private final SettingGroup sgGeneral = settings.getDefaultGroup();
private final Setting<Boolean> moon = sgGeneral.add(new BoolSetting.Builder()
.name("moon")
.description("Tired of being on earth?")
.defaultValue(true)
.build()
);
@EventHandler
private void onTick(TickEvent.Post event) {
if (mc.options.keySneak.isPressed()) return;
if (moon.get()) {
Vec3d velocity = mc.player.getVelocity();
((IVec3d) velocity).set(velocity.x, velocity.y + 0.0568000030517578, velocity.z);
}
}
}