1.17 pog (#12)
* 1.17? * event bus monke * coding on da github * fixes fixes bruh * fixes again * lazy fix to worklow actions * fix gradle.yml
This commit is contained in:
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 16
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '16'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|||||||
8
.github/workflows/pull_request.yml
vendored
8
.github/workflows/pull_request.yml
vendored
@@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
name: Java CI with Gradle
|
name: Java CI with Gradle
|
||||||
|
|
||||||
on:
|
on: [pull_request, push]
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -14,10 +12,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 16
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '16'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -31,3 +31,6 @@ bin/
|
|||||||
# fabric
|
# fabric
|
||||||
|
|
||||||
run/
|
run/
|
||||||
|
|
||||||
|
#lazy fix for now
|
||||||
|
!build/loom-cache/meteor-client-*.jar
|
||||||
12
build.gradle
12
build.gradle
@@ -1,11 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
//id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_16
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_16
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
@@ -27,7 +27,7 @@ dependencies {
|
|||||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||||
// You may need to force-disable transitiveness on them.
|
// You may need to force-disable transitiveness on them.
|
||||||
|
|
||||||
modImplementation "com.github.MeteorDevelopment:meteor-client:1.16.5-cont-SNAPSHOT"
|
modImplementation "com.github.MeteorDevelopment:meteor-client:master-SNAPSHOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@@ -48,7 +48,7 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
||||||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
||||||
// We'll use that if it's available, but otherwise we'll use the older option.
|
// We'll use that if it's available, but otherwise we'll use the older option.
|
||||||
def targetVersion = 8
|
def targetVersion = 16
|
||||||
if (JavaVersion.current().isJava9Compatible()) {
|
if (JavaVersion.current().isJava9Compatible()) {
|
||||||
it.options.release = targetVersion
|
it.options.release = targetVersion
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
build/loom-cache/meteor-client-master-SNAPSHOT.jar
Normal file
BIN
build/loom-cache/meteor-client-master-SNAPSHOT.jar
Normal file
Binary file not shown.
@@ -2,8 +2,8 @@
|
|||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
minecraft_version=1.16.5
|
minecraft_version=1.17
|
||||||
yarn_mappings=1.16.5+build.3
|
yarn_mappings=1.17+build.1
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
@@ -12,4 +12,4 @@ maven_group = cloudburst.rejects
|
|||||||
archives_base_name = meteor-rejects-addon
|
archives_base_name = meteor-rejects-addon
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.34.6+1.16
|
fabric_version=0.34.9+1.17
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package cloudburst.rejects;
|
|||||||
|
|
||||||
import cloudburst.rejects.gui.themes.rounded.MeteorRoundedGuiTheme;
|
import cloudburst.rejects.gui.themes.rounded.MeteorRoundedGuiTheme;
|
||||||
import minegame159.meteorclient.MeteorAddon;
|
import minegame159.meteorclient.MeteorAddon;
|
||||||
|
import minegame159.meteorclient.MeteorClient;
|
||||||
import minegame159.meteorclient.gui.GuiThemes;
|
import minegame159.meteorclient.gui.GuiThemes;
|
||||||
import minegame159.meteorclient.systems.commands.Commands;
|
import minegame159.meteorclient.systems.commands.Commands;
|
||||||
import minegame159.meteorclient.systems.modules.Category;
|
import minegame159.meteorclient.systems.modules.Category;
|
||||||
@@ -11,6 +12,7 @@ import minegame159.meteorclient.systems.modules.render.hud.HUD;
|
|||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import java.lang.invoke.MethodHandles;
|
||||||
|
|
||||||
import cloudburst.rejects.commands.*;
|
import cloudburst.rejects.commands.*;
|
||||||
import cloudburst.rejects.gui.hud.*;
|
import cloudburst.rejects.gui.hud.*;
|
||||||
@@ -23,6 +25,8 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
|||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
LOG.info("Initializing Meteor Rejects Addon");
|
LOG.info("Initializing Meteor Rejects Addon");
|
||||||
|
|
||||||
|
MeteorClient.EVENT_BUS.registerLambdaFactory("cloudburst.rejects", (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup()));
|
||||||
|
|
||||||
Modules modules = Modules.get();
|
Modules modules = Modules.get();
|
||||||
modules.add(new AntiBot());
|
modules.add(new AntiBot());
|
||||||
|
|||||||
@@ -38,24 +38,24 @@ public class GiveCommand extends Command {
|
|||||||
@Override
|
@Override
|
||||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||||
builder.then(literal("egg").executes(ctx -> {
|
builder.then(literal("egg").executes(ctx -> {
|
||||||
if (!mc.player.abilities.creativeMode) throw NOT_IN_CREATIVE.create();
|
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
|
||||||
ItemStack inHand = mc.player.getMainHandStack();
|
ItemStack inHand = mc.player.getMainHandStack();
|
||||||
ItemStack item = new ItemStack(Items.STRIDER_SPAWN_EGG);
|
ItemStack item = new ItemStack(Items.STRIDER_SPAWN_EGG);
|
||||||
CompoundTag ct = new CompoundTag();
|
NbtCompound ct = new NbtCompound();
|
||||||
if (inHand.getItem() instanceof BlockItem) {
|
if (inHand.getItem() instanceof BlockItem) {
|
||||||
ct.putInt("Time",1);
|
ct.putInt("Time",1);
|
||||||
ct.putString("id", "minecraft:falling_block");
|
ct.putString("id", "minecraft:falling_block");
|
||||||
ct.put("BlockState", new CompoundTag());
|
ct.put("BlockState", new NbtCompound());
|
||||||
ct.getCompound("BlockState").putString("Name", Registry.ITEM.getId(inHand.getItem()).toString());
|
ct.getCompound("BlockState").putString("Name", Registry.ITEM.getId(inHand.getItem()).toString());
|
||||||
if (inHand.hasTag() && inHand.getTag().contains("BlockEntityTag")) {
|
if (inHand.hasTag() && inHand.getTag().contains("BlockEntityTag")) {
|
||||||
ct.put("TileEntityData", inHand.getTag().getCompound("BlockEntityTag"));
|
ct.put("TileEntityData", inHand.getTag().getCompound("BlockEntityTag"));
|
||||||
}
|
}
|
||||||
CompoundTag t = new CompoundTag();
|
NbtCompound t = new NbtCompound();
|
||||||
t.put("EntityTag", ct);
|
t.put("EntityTag", ct);
|
||||||
item.setTag(t);
|
item.setTag(t);
|
||||||
} else {
|
} else {
|
||||||
ct.putString("id", "minecraft:item");
|
ct.putString("id", "minecraft:item");
|
||||||
CompoundTag it = new CompoundTag();
|
NbtCompound it = new NbtCompound();
|
||||||
it.putString("id", Registry.ITEM.getId(inHand.getItem()).toString());
|
it.putString("id", Registry.ITEM.getId(inHand.getItem()).toString());
|
||||||
it.putInt("Count",inHand.getCount());
|
it.putInt("Count",inHand.getCount());
|
||||||
if (inHand.hasTag()) {
|
if (inHand.hasTag()) {
|
||||||
@@ -63,7 +63,7 @@ public class GiveCommand extends Command {
|
|||||||
}
|
}
|
||||||
ct.put("Item",it);
|
ct.put("Item",it);
|
||||||
}
|
}
|
||||||
CompoundTag t = new CompoundTag();
|
NbtCompound t = new NbtCompound();
|
||||||
t.put("EntityTag", ct);
|
t.put("EntityTag", ct);
|
||||||
item.setTag(t);
|
item.setTag(t);
|
||||||
item.setCustomName(inHand.getName());
|
item.setCustomName(inHand.getName());
|
||||||
@@ -72,37 +72,37 @@ public class GiveCommand extends Command {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
builder.then(literal("holo").then(argument("message", StringArgumentType.greedyString()).executes(ctx -> {
|
builder.then(literal("holo").then(argument("message", StringArgumentType.greedyString()).executes(ctx -> {
|
||||||
if (!mc.player.abilities.creativeMode) throw NOT_IN_CREATIVE.create();
|
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
|
||||||
String message = ctx.getArgument("message", String.class);
|
String message = ctx.getArgument("message", String.class);
|
||||||
message = message.replace("&", "\247");
|
message = message.replace("&", "\247");
|
||||||
ItemStack stack = new ItemStack(Items.ARMOR_STAND);
|
ItemStack stack = new ItemStack(Items.ARMOR_STAND);
|
||||||
CompoundTag tag = new CompoundTag();
|
NbtCompound tag = new NbtCompound();
|
||||||
ListTag listTag = new ListTag();
|
NbtList NbtList = new NbtList();
|
||||||
listTag.add(DoubleTag.of(mc.player.getX()));
|
NbtList.add(NbtDouble.of(mc.player.getX()));
|
||||||
listTag.add(DoubleTag.of(mc.player.getY()));
|
NbtList.add(NbtDouble.of(mc.player.getY()));
|
||||||
listTag.add(DoubleTag.of(mc.player.getZ()));
|
NbtList.add(NbtDouble.of(mc.player.getZ()));
|
||||||
tag.putBoolean("Invisible", true);
|
tag.putBoolean("Invisible", true);
|
||||||
tag.putBoolean("Invulnerable", true);
|
tag.putBoolean("Invulnerable", true);
|
||||||
tag.putBoolean("Interpret", true);
|
tag.putBoolean("Interpret", true);
|
||||||
tag.putBoolean("NoGravity", true);
|
tag.putBoolean("NoGravity", true);
|
||||||
tag.putBoolean("CustomNameVisible", true);
|
tag.putBoolean("CustomNameVisible", true);
|
||||||
tag.putString("CustomName", Text.Serializer.toJson(new LiteralText(message)));
|
tag.putString("CustomName", Text.Serializer.toJson(new LiteralText(message)));
|
||||||
tag.put("Pos", listTag);
|
tag.put("Pos", NbtList);
|
||||||
stack.putSubTag("EntityTag", tag);
|
stack.putSubTag("EntityTag", tag);
|
||||||
addItem(stack);
|
addItem(stack);
|
||||||
return SINGLE_SUCCESS;
|
return SINGLE_SUCCESS;
|
||||||
})));
|
})));
|
||||||
|
|
||||||
builder.then(literal("firework").executes(ctx -> {
|
builder.then(literal("firework").executes(ctx -> {
|
||||||
if (!mc.player.abilities.creativeMode) throw NOT_IN_CREATIVE.create();
|
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
|
||||||
ItemStack firework = new ItemStack(Items.FIREWORK_ROCKET);
|
ItemStack firework = new ItemStack(Items.FIREWORK_ROCKET);
|
||||||
CompoundTag baseCompound = new CompoundTag();
|
NbtCompound baseCompound = new NbtCompound();
|
||||||
CompoundTag tagCompound = new CompoundTag();
|
NbtCompound tagCompound = new NbtCompound();
|
||||||
ListTag explosionList = new ListTag();
|
NbtList explosionList = new NbtList();
|
||||||
|
|
||||||
for(int i = 0; i < 5000; i++)
|
for(int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
CompoundTag explosionCompound = new CompoundTag();
|
NbtCompound explosionCompound = new NbtCompound();
|
||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
explosionCompound.putByte("Type", (byte)rand.nextInt(5));
|
explosionCompound.putByte("Type", (byte)rand.nextInt(5));
|
||||||
@@ -123,10 +123,10 @@ public class GiveCommand extends Command {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
builder.then(literal("head").then(argument("owner",StringArgumentType.greedyString()).executes(ctx -> {
|
builder.then(literal("head").then(argument("owner",StringArgumentType.greedyString()).executes(ctx -> {
|
||||||
if (!mc.player.abilities.creativeMode) throw NOT_IN_CREATIVE.create();
|
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
|
||||||
String playerName = ctx.getArgument("owner",String.class);
|
String playerName = ctx.getArgument("owner",String.class);
|
||||||
ItemStack itemStack = new ItemStack(Items.PLAYER_HEAD);
|
ItemStack itemStack = new ItemStack(Items.PLAYER_HEAD);
|
||||||
CompoundTag tag = new CompoundTag();
|
NbtCompound tag = new NbtCompound();
|
||||||
tag.putString("SkullOwner", playerName);
|
tag.putString("SkullOwner", playerName);
|
||||||
itemStack.setTag(tag);
|
itemStack.setTag(tag);
|
||||||
addItem(itemStack);
|
addItem(itemStack);
|
||||||
@@ -135,7 +135,7 @@ public class GiveCommand extends Command {
|
|||||||
|
|
||||||
builder.then(literal("preset").then(argument("name", new EnumStringArgumentType(PRESETS))
|
builder.then(literal("preset").then(argument("name", new EnumStringArgumentType(PRESETS))
|
||||||
.then(argument("container", new EnumStringArgumentType(CONTAINERS)).executes(context -> {
|
.then(argument("container", new EnumStringArgumentType(CONTAINERS)).executes(context -> {
|
||||||
if (!mc.player.abilities.creativeMode) throw NOT_IN_CREATIVE.create();
|
if (!mc.player.getAbilities().creativeMode) throw NOT_IN_CREATIVE.create();
|
||||||
String name = context.getArgument("name", String.class);
|
String name = context.getArgument("name", String.class);
|
||||||
String container = context.getArgument("container", String.class);
|
String container = context.getArgument("container", String.class);
|
||||||
addItem(createPreset(name, container));
|
addItem(createPreset(name, container));
|
||||||
@@ -145,7 +145,7 @@ public class GiveCommand extends Command {
|
|||||||
|
|
||||||
private void addItem(ItemStack item) throws CommandSyntaxException {
|
private void addItem(ItemStack item) throws CommandSyntaxException {
|
||||||
for(int i = 0; i < 36; i++) {
|
for(int i = 0; i < 36; i++) {
|
||||||
ItemStack stack = mc.player.inventory.getStack(SlotUtils.indexToId(i));
|
ItemStack stack = mc.player.getInventory().getStack(SlotUtils.indexToId(i));
|
||||||
if (!stack.isEmpty()) continue;
|
if (!stack.isEmpty()) continue;
|
||||||
mc.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(SlotUtils.indexToId(i), item));
|
mc.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(SlotUtils.indexToId(i), item));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import net.minecraft.client.MinecraftClient;
|
|||||||
import net.minecraft.client.gui.screen.ChatScreen;
|
import net.minecraft.client.gui.screen.ChatScreen;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
||||||
import net.minecraft.client.options.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.util.InputUtil;
|
import net.minecraft.client.util.InputUtil;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -64,14 +64,14 @@ public class InteractionScreen extends Screen {
|
|||||||
if (client.player.isRiding()) {
|
if (client.player.isRiding()) {
|
||||||
client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true));
|
client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true));
|
||||||
}
|
}
|
||||||
client.player.networkHandler.sendPacket(new PlayerInteractEntityC2SPacket(entity, Hand.MAIN_HAND, true));
|
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
|
||||||
client.player.setSneaking(false);
|
client.player.setSneaking(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (entity instanceof StorageMinecartEntity) {
|
else if (entity instanceof StorageMinecartEntity) {
|
||||||
functions.put("Open Inventory", (Entity e) -> {
|
functions.put("Open Inventory", (Entity e) -> {
|
||||||
closeScreen();
|
closeScreen();
|
||||||
client.player.networkHandler.sendPacket(new PlayerInteractEntityC2SPacket(entity, Hand.MAIN_HAND, false));
|
client.player.networkHandler.sendPacket(PlayerInteractEntityC2SPacket.interact(entity, true, Hand.MAIN_HAND));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -165,8 +165,8 @@ public class InteractionScreen extends Screen {
|
|||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
this.cursorMode(GLFW.GLFW_CURSOR_HIDDEN);
|
this.cursorMode(GLFW.GLFW_CURSOR_HIDDEN);
|
||||||
yaw = client.player.yaw;
|
yaw = client.player.getYaw();
|
||||||
pitch = client.player.pitch;
|
pitch = client.player.getPitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cursorMode(int mode) {
|
private void cursorMode(int mode) {
|
||||||
@@ -237,8 +237,8 @@ public class InteractionScreen extends Screen {
|
|||||||
this.crosshairX = (int) mouse.x + width / 2;
|
this.crosshairX = (int) mouse.x + width / 2;
|
||||||
this.crosshairY = (int) mouse.y + height / 2;
|
this.crosshairY = (int) mouse.y + height / 2;
|
||||||
|
|
||||||
client.player.yaw = yaw + cross.x / 3;
|
client.player.setYaw( yaw + cross.x / 3);
|
||||||
client.player.pitch = MathHelper.clamp(pitch + cross.y / 3, -90f, 90f);
|
client.player.setPitch(MathHelper.clamp(pitch + cross.y / 3, -90f, 90f));
|
||||||
super.render(matrix, mouseX, mouseY, delta);
|
super.render(matrix, mouseX, mouseY, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class StatsScreen extends WindowScreen {
|
|||||||
dimensionExpanded = dimension.isExpanded();
|
dimensionExpanded = dimension.isExpanded();
|
||||||
};
|
};
|
||||||
dimension.add(theme.label(String.format("Position: %.2f, %.2f, %.2f", entity.getX(), entity.getY(), entity.getZ()))).expandX();
|
dimension.add(theme.label(String.format("Position: %.2f, %.2f, %.2f", entity.getX(), entity.getY(), entity.getZ()))).expandX();
|
||||||
dimension.add(theme.label(String.format("Yaw: %.2f, Pitch: %.2f", entity.yaw, entity.pitch))).expandX();
|
dimension.add(theme.label(String.format("Yaw: %.2f, Pitch: %.2f", entity.getYaw(), entity.getPitch()))).expandX();
|
||||||
Box box = entity.getBoundingBox();
|
Box box = entity.getBoundingBox();
|
||||||
dimension.add(theme.label(String.format("Bounding Box: %.2f, %.2f, %.2f",
|
dimension.add(theme.label(String.format("Bounding Box: %.2f, %.2f, %.2f",
|
||||||
box.maxX-box.minX, box.maxY-box.minY, box.maxZ-box.minZ
|
box.maxX-box.minX, box.maxY-box.minY, box.maxZ-box.minZ
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import minegame159.meteorclient.gui.widgets.input.WDropdown;
|
|||||||
import minegame159.meteorclient.gui.widgets.input.WSlider;
|
import minegame159.meteorclient.gui.widgets.input.WSlider;
|
||||||
import minegame159.meteorclient.gui.widgets.input.WTextBox;
|
import minegame159.meteorclient.gui.widgets.input.WTextBox;
|
||||||
import minegame159.meteorclient.gui.widgets.pressable.*;
|
import minegame159.meteorclient.gui.widgets.pressable.*;
|
||||||
import minegame159.meteorclient.rendering.text.TextRenderer;
|
import minegame159.meteorclient.renderer.text.TextRenderer;
|
||||||
import minegame159.meteorclient.settings.*;
|
import minegame159.meteorclient.settings.*;
|
||||||
import minegame159.meteorclient.systems.accounts.Account;
|
import minegame159.meteorclient.systems.accounts.Account;
|
||||||
import minegame159.meteorclient.systems.modules.Module;
|
import minegame159.meteorclient.systems.modules.Module;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import net.fabricmc.api.EnvType;
|
|||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -22,7 +22,7 @@ public class LivingEntityRendererMixin {
|
|||||||
private void dinnerboneEntities(LivingEntity entity, MatrixStack matrices, float _animationProgress, float _bodyYaw, float _tickDelta, CallbackInfo _info) {
|
private void dinnerboneEntities(LivingEntity entity, MatrixStack matrices, float _animationProgress, float _bodyYaw, float _tickDelta, CallbackInfo _info) {
|
||||||
if ((!(entity instanceof PlayerEntity)) && Modules.get().get(Rendering.class).dinnerboneEnabled()) {
|
if ((!(entity instanceof PlayerEntity)) && Modules.get().get(Rendering.class).dinnerboneEnabled()) {
|
||||||
matrices.translate(0.0D, entity.getHeight() + 0.1F, 0.0D);
|
matrices.translate(0.0D, entity.getHeight() + 0.1F, 0.0D);
|
||||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180.0F));
|
matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(180.0F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package cloudburst.rejects.mixin.meteor;
|
package cloudburst.rejects.mixin.meteor;
|
||||||
|
|
||||||
import minegame159.meteorclient.gui.renderer.GuiRenderer;
|
import minegame159.meteorclient.gui.renderer.GuiRenderer;
|
||||||
import minegame159.meteorclient.rendering.MeshBuilder;
|
import minegame159.meteorclient.renderer.Renderer2D;
|
||||||
import org.spongepowered.asm.mixin.*;
|
import org.spongepowered.asm.mixin.*;
|
||||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
@Mixin(GuiRenderer.class)
|
@Mixin(GuiRenderer.class)
|
||||||
public interface GuiRendererAccessor {
|
public interface GuiRendererAccessor {
|
||||||
@Accessor("mb")
|
@Accessor("r")
|
||||||
MeshBuilder getMeshbuilder();
|
Renderer2D getRenderer2D();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class AntiBot extends Module {
|
|||||||
{
|
{
|
||||||
if (removeInvisible.get() && !entity.isInvisible()) continue;
|
if (removeInvisible.get() && !entity.isInvisible()) continue;
|
||||||
|
|
||||||
if (isBot(entity)) entity.remove();
|
if (isBot(entity)) entity.remove(Entity.RemovalReason.DISCARDED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,15 +145,15 @@ public class Auto32K extends Module {
|
|||||||
}
|
}
|
||||||
phase += 1;
|
phase += 1;
|
||||||
} else if (phase == 1) {
|
} else if (phase == 1) {
|
||||||
mc.player.inventory.selectedSlot = dispenserSlot.getSlot();
|
mc.player.getInventory().selectedSlot = dispenserSlot.getSlot();
|
||||||
if (x == -1) {
|
if (x == -1) {
|
||||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(-90f, mc.player.pitch, mc.player.isOnGround()));
|
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(-90f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||||
} else if (x == 1) {
|
} else if (x == 1) {
|
||||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(90f, mc.player.pitch, mc.player.isOnGround()));
|
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(90f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||||
} else if (z == -1) {
|
} else if (z == -1) {
|
||||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(1f, mc.player.pitch, mc.player.isOnGround()));
|
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(1f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||||
} else if (z == 1) {
|
} else if (z == 1) {
|
||||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(179f, mc.player.pitch, mc.player.isOnGround()));
|
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(179f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||||
}
|
}
|
||||||
phase += 1;
|
phase += 1;
|
||||||
} else if (phase == 2) {
|
} else if (phase == 2) {
|
||||||
@@ -170,7 +170,7 @@ public class Auto32K extends Module {
|
|||||||
mc.player.closeHandledScreen();
|
mc.player.closeHandledScreen();
|
||||||
phase += 1;
|
phase += 1;
|
||||||
}else if (phase == 6) {
|
}else if (phase == 6) {
|
||||||
mc.player.inventory.selectedSlot = redstoneSlot.getSlot();
|
mc.player.getInventory().selectedSlot = redstoneSlot.getSlot();
|
||||||
mc.player.setSneaking(true);
|
mc.player.setSneaking(true);
|
||||||
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(2), false));
|
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(2), false));
|
||||||
mc.player.setSneaking(false);
|
mc.player.setSneaking(false);
|
||||||
@@ -188,7 +188,7 @@ public class Auto32K extends Module {
|
|||||||
Iterator<Block> blocks = throwawayItems.get().iterator();
|
Iterator<Block> blocks = throwawayItems.get().iterator();
|
||||||
for (Item item = blocks.next().asItem(); blocks.hasNext(); item = blocks.next().asItem()) {
|
for (Item item = blocks.next().asItem(); blocks.hasNext(); item = blocks.next().asItem()) {
|
||||||
for (int i = 5; i <= 40; i++) {
|
for (int i = 5; i <= 40; i++) {
|
||||||
ItemStack stack = mc.player.inventory.getStack(i);
|
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||||
if (stack.getItem() == item && stack.getCount() >= 4) {
|
if (stack.getItem() == item && stack.getCount() >= 4) {
|
||||||
slot = i;
|
slot = i;
|
||||||
count = stack.getCount();
|
count = stack.getCount();
|
||||||
@@ -218,7 +218,7 @@ public class Auto32K extends Module {
|
|||||||
}
|
}
|
||||||
if (dropSlot != -1) InvUtils.drop().slot(dropSlot);
|
if (dropSlot != -1) InvUtils.drop().slot(dropSlot);
|
||||||
if(autoMove.get() && manage){
|
if(autoMove.get() && manage){
|
||||||
int slot2 = mc.player.inventory.getEmptySlot();
|
int slot2 = mc.player.getInventory().getEmptySlot();
|
||||||
if (slot2 < 9 && slot2 != -1 && EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) > 5) {
|
if (slot2 < 9 && slot2 != -1 && EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) > 5) {
|
||||||
InvUtils.move().fromId(0).to(slot2 - 4);
|
InvUtils.move().fromId(0).to(slot2 - 4);
|
||||||
} else if (EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) <= 5 && mc.player.currentScreenHandler.getSlot(0).getStack().getItem() != Items.AIR) {
|
} else if (EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) <= 5 && mc.player.currentScreenHandler.getSlot(0).getStack().getItem() != Items.AIR) {
|
||||||
@@ -226,7 +226,7 @@ public class Auto32K extends Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(slot != -1) {
|
if(slot != -1) {
|
||||||
mc.player.inventory.selectedSlot = slot - 32;
|
mc.player.getInventory().selectedSlot = slot - 32;
|
||||||
}
|
}
|
||||||
}else this.toggle();
|
}else this.toggle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,17 +150,17 @@ public class AutoExtinguish extends Module {
|
|||||||
|
|
||||||
private void place(int slot) {
|
private void place(int slot) {
|
||||||
if (slot != -1) {
|
if (slot != -1) {
|
||||||
final int preSlot = mc.player.inventory.selectedSlot;
|
final int preSlot = mc.player.getInventory().selectedSlot;
|
||||||
if (center.get()) {
|
if (center.get()) {
|
||||||
PlayerUtils.centerPlayer();
|
PlayerUtils.centerPlayer();
|
||||||
}
|
}
|
||||||
mc.player.inventory.selectedSlot = slot;
|
mc.player.getInventory().selectedSlot = slot;
|
||||||
float yaw = mc.gameRenderer.getCamera().getYaw() % 360;
|
float yaw = mc.gameRenderer.getCamera().getYaw() % 360;
|
||||||
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
|
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
|
||||||
|
|
||||||
Rotations.rotate(yaw, 90);
|
Rotations.rotate(yaw, 90);
|
||||||
mc.interactionManager.interactItem(mc.player, mc.player.world, Hand.MAIN_HAND);
|
mc.interactionManager.interactItem(mc.player, mc.player.world, Hand.MAIN_HAND);
|
||||||
mc.player.inventory.selectedSlot = preSlot;
|
mc.player.getInventory().selectedSlot = preSlot;
|
||||||
Rotations.rotate(yaw, pitch);
|
Rotations.rotate(yaw, pitch);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ public class AutoExtinguish extends Module {
|
|||||||
private int findSlot(Item item) {
|
private int findSlot(Item item) {
|
||||||
int slot = -1;
|
int slot = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
ItemStack block = mc.player.inventory.getStack(i);
|
ItemStack block = mc.player.getInventory().getStack(i);
|
||||||
if (block.getItem() == item) {
|
if (block.getItem() == item) {
|
||||||
slot = i;
|
slot = i;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ public class AutoHighway extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Direction getDirection(PlayerEntity player){
|
private Direction getDirection(PlayerEntity player){
|
||||||
double yaw = player.yaw;
|
double yaw = player.getYaw();
|
||||||
if(yaw==0) return Direction.SOUTH;
|
if(yaw==0) return Direction.SOUTH;
|
||||||
if(yaw<0){
|
if(yaw<0){
|
||||||
yaw = yaw - MathHelper.ceil(yaw / 360) * 360;
|
yaw = yaw - MathHelper.ceil(yaw / 360) * 360;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package cloudburst.rejects.modules;
|
package cloudburst.rejects.modules;
|
||||||
|
|
||||||
import baritone.api.BaritoneAPI;
|
//import baritone.api.BaritoneAPI;
|
||||||
import cloudburst.rejects.MeteorRejectsAddon;
|
import cloudburst.rejects.MeteorRejectsAddon;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import minegame159.meteorclient.events.entity.player.ItemUseCrosshairTargetEvent;
|
import minegame159.meteorclient.events.entity.player.ItemUseCrosshairTargetEvent;
|
||||||
@@ -110,7 +110,7 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
if (drinking) {
|
if (drinking) {
|
||||||
if (ShouldDrinkHealth()) {
|
if (ShouldDrinkHealth()) {
|
||||||
if (isNotPotion(mc.player.inventory.getStack(slot))) {
|
if (isNotPotion(mc.player.getInventory().getStack(slot))) {
|
||||||
slot = HealingpotionSlot();
|
slot = HealingpotionSlot();
|
||||||
if (slot == -1) {
|
if (slot == -1) {
|
||||||
info("Ran out of Pots while drinking");
|
info("Ran out of Pots while drinking");
|
||||||
@@ -128,7 +128,7 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
if (splashing) {
|
if (splashing) {
|
||||||
if (ShouldDrinkHealth()) {
|
if (ShouldDrinkHealth()) {
|
||||||
if (isNotSplashPotion(mc.player.inventory.getStack(slot))) {
|
if (isNotSplashPotion(mc.player.getInventory().getStack(slot))) {
|
||||||
slot = HealingSplashpotionSlot();
|
slot = HealingSplashpotionSlot();
|
||||||
if (slot == -1) {
|
if (slot == -1) {
|
||||||
info("Ran out of Pots while splashing");
|
info("Ran out of Pots while splashing");
|
||||||
@@ -162,7 +162,7 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
if (drinking) {
|
if (drinking) {
|
||||||
if (ShouldDrinkStrength()) {
|
if (ShouldDrinkStrength()) {
|
||||||
if (isNotPotion(mc.player.inventory.getStack(slot))) {
|
if (isNotPotion(mc.player.getInventory().getStack(slot))) {
|
||||||
slot = StrengthpotionSlot();
|
slot = StrengthpotionSlot();
|
||||||
if (slot == -1) {
|
if (slot == -1) {
|
||||||
stopDrinking();
|
stopDrinking();
|
||||||
@@ -177,7 +177,7 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
if (splashing) {
|
if (splashing) {
|
||||||
if (ShouldDrinkStrength()) {
|
if (ShouldDrinkStrength()) {
|
||||||
if (isNotSplashPotion(mc.player.inventory.getStack(slot))) {
|
if (isNotSplashPotion(mc.player.getInventory().getStack(slot))) {
|
||||||
slot = StrengthSplashpotionSlot();
|
slot = StrengthSplashpotionSlot();
|
||||||
if (slot == -1) {
|
if (slot == -1) {
|
||||||
info("Ran out of Pots while splashing");
|
info("Ran out of Pots while splashing");
|
||||||
@@ -200,7 +200,7 @@ public class AutoPot extends Module {
|
|||||||
mc.options.keyUse.setPressed(pressed);
|
mc.options.keyUse.setPressed(pressed);
|
||||||
}
|
}
|
||||||
private void startDrinking() {
|
private void startDrinking() {
|
||||||
prevSlot = mc.player.inventory.selectedSlot;
|
prevSlot = mc.player.getInventory().selectedSlot;
|
||||||
drink();
|
drink();
|
||||||
// Pause auras
|
// Pause auras
|
||||||
wasAura.clear();
|
wasAura.clear();
|
||||||
@@ -216,15 +216,15 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
// Pause baritone
|
// Pause baritone
|
||||||
wasBaritone = false;
|
wasBaritone = false;
|
||||||
if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
|
//if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
|
||||||
wasBaritone = true;
|
// wasBaritone = true;
|
||||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
|
// BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
private void startSplashing() {
|
private void startSplashing() {
|
||||||
prevSlot = mc.player.inventory.selectedSlot;
|
prevSlot = mc.player.getInventory().selectedSlot;
|
||||||
if (lookDown.get()){
|
if (lookDown.get()){
|
||||||
Rotations.rotate(mc.player.yaw, 90); splash();
|
Rotations.rotate(mc.player.getYaw(), 90); splash();
|
||||||
}
|
}
|
||||||
splash();
|
splash();
|
||||||
// Pause auras
|
// Pause auras
|
||||||
@@ -240,11 +240,11 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Pause baritone
|
// Pause baritone
|
||||||
wasBaritone = false;
|
//wasBaritone = false;
|
||||||
if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
|
//if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
|
||||||
wasBaritone = true;
|
// wasBaritone = true;
|
||||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
|
// BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
private void drink() {
|
private void drink() {
|
||||||
changeSlot(slot);
|
changeSlot(slot);
|
||||||
@@ -274,9 +274,9 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Resume baritone
|
// Resume baritone
|
||||||
if (pauseBaritone.get() && wasBaritone) {
|
//if (pauseBaritone.get() && wasBaritone) {
|
||||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("resume");
|
// BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("resume");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
private void stopSplashing() {
|
private void stopSplashing() {
|
||||||
changeSlot(prevSlot);
|
changeSlot(prevSlot);
|
||||||
@@ -295,16 +295,16 @@ public class AutoPot extends Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Resume baritone
|
// Resume baritone
|
||||||
if (pauseBaritone.get() && wasBaritone) {
|
//if (pauseBaritone.get() && wasBaritone) {
|
||||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("resume");
|
// BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("resume");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
private double truehealth() {
|
private double truehealth() {
|
||||||
assert mc.player != null;
|
assert mc.player != null;
|
||||||
return mc.player.getHealth();
|
return mc.player.getHealth();
|
||||||
}
|
}
|
||||||
private void changeSlot(int slot) {
|
private void changeSlot(int slot) {
|
||||||
mc.player.inventory.selectedSlot = slot;
|
mc.player.getInventory().selectedSlot = slot;
|
||||||
this.slot = slot;
|
this.slot = slot;
|
||||||
}
|
}
|
||||||
//Sunk 7 hours into these checks, if i die blame checks
|
//Sunk 7 hours into these checks, if i die blame checks
|
||||||
@@ -313,11 +313,11 @@ public class AutoPot extends Module {
|
|||||||
int slot = -1;
|
int slot = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
// Skip if item stack is empty
|
// Skip if item stack is empty
|
||||||
ItemStack stack = mc.player.inventory.getStack(i);
|
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||||
if (stack.isEmpty()) continue;
|
if (stack.isEmpty()) continue;
|
||||||
if (stack.getItem() != Items.POTION) continue;
|
if (stack.getItem() != Items.POTION) continue;
|
||||||
if (stack.getItem() == Items.POTION) {
|
if (stack.getItem() == Items.POTION) {
|
||||||
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.inventory.getStack(i)).getEffects();
|
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.getInventory().getStack(i)).getEffects();
|
||||||
if (effects.size() > 0) {
|
if (effects.size() > 0) {
|
||||||
StatusEffectInstance effect = effects.get(0);
|
StatusEffectInstance effect = effects.get(0);
|
||||||
if (effect.getTranslationKey().equals("effect.minecraft.instant_health")) {
|
if (effect.getTranslationKey().equals("effect.minecraft.instant_health")) {
|
||||||
@@ -333,11 +333,11 @@ public class AutoPot extends Module {
|
|||||||
int slot = -1;
|
int slot = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
// Skip if item stack is empty
|
// Skip if item stack is empty
|
||||||
ItemStack stack = mc.player.inventory.getStack(i);
|
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||||
if (stack.isEmpty()) continue;
|
if (stack.isEmpty()) continue;
|
||||||
if (stack.getItem() != Items.SPLASH_POTION) continue;
|
if (stack.getItem() != Items.SPLASH_POTION) continue;
|
||||||
if (stack.getItem() == Items.SPLASH_POTION) {
|
if (stack.getItem() == Items.SPLASH_POTION) {
|
||||||
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.inventory.getStack(i)).getEffects();
|
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.getInventory().getStack(i)).getEffects();
|
||||||
if (effects.size() > 0) {
|
if (effects.size() > 0) {
|
||||||
StatusEffectInstance effect = effects.get(0);
|
StatusEffectInstance effect = effects.get(0);
|
||||||
if (effect.getTranslationKey().equals("effect.minecraft.instant_health")) {
|
if (effect.getTranslationKey().equals("effect.minecraft.instant_health")) {
|
||||||
@@ -354,11 +354,11 @@ public class AutoPot extends Module {
|
|||||||
int slot = -1;
|
int slot = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
// Skip if item stack is empty
|
// Skip if item stack is empty
|
||||||
ItemStack stack = mc.player.inventory.getStack(i);
|
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||||
if (stack.isEmpty()) continue;
|
if (stack.isEmpty()) continue;
|
||||||
if (stack.getItem() != Items.SPLASH_POTION) continue;
|
if (stack.getItem() != Items.SPLASH_POTION) continue;
|
||||||
if (stack.getItem() == Items.SPLASH_POTION) {
|
if (stack.getItem() == Items.SPLASH_POTION) {
|
||||||
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.inventory.getStack(i)).getEffects();
|
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.getInventory().getStack(i)).getEffects();
|
||||||
if (effects.size() > 0) {
|
if (effects.size() > 0) {
|
||||||
StatusEffectInstance effect = effects.get(0);
|
StatusEffectInstance effect = effects.get(0);
|
||||||
if (effect.getTranslationKey().equals("effect.minecraft.strength")) {
|
if (effect.getTranslationKey().equals("effect.minecraft.strength")) {
|
||||||
@@ -375,11 +375,11 @@ public class AutoPot extends Module {
|
|||||||
int slot = -1;
|
int slot = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
// Skip if item stack is empty
|
// Skip if item stack is empty
|
||||||
ItemStack stack = mc.player.inventory.getStack(i);
|
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||||
if (stack.isEmpty()) continue;
|
if (stack.isEmpty()) continue;
|
||||||
if (stack.getItem() != Items.POTION) continue;
|
if (stack.getItem() != Items.POTION) continue;
|
||||||
if (stack.getItem() == Items.POTION) {
|
if (stack.getItem() == Items.POTION) {
|
||||||
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.inventory.getStack(i)).getEffects();
|
List<StatusEffectInstance> effects = PotionUtil.getPotion(mc.player.getInventory().getStack(i)).getEffects();
|
||||||
if (effects.size() > 0) {
|
if (effects.size() > 0) {
|
||||||
StatusEffectInstance effect = effects.get(0);
|
StatusEffectInstance effect = effects.get(0);
|
||||||
if (effect.getTranslationKey().equals("effect.minecraft.strength")) {
|
if (effect.getTranslationKey().equals("effect.minecraft.strength")) {
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ public class AutoTNT extends Module {
|
|||||||
|
|
||||||
private void ignite(BlockPos pos, FindItemResult item) {
|
private void ignite(BlockPos pos, FindItemResult item) {
|
||||||
// Set slots
|
// Set slots
|
||||||
preSlot = mc.player.inventory.selectedSlot;
|
preSlot = mc.player.getInventory().selectedSlot;
|
||||||
mc.player.inventory.selectedSlot = item.getSlot();
|
mc.player.getInventory().selectedSlot = item.getSlot();
|
||||||
|
|
||||||
|
|
||||||
ActionResult result = mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
|
ActionResult result = mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
|
||||||
@@ -132,7 +132,7 @@ public class AutoTNT extends Module {
|
|||||||
if (result == ActionResult.CONSUME || result == ActionResult.SUCCESS) ignited = true;
|
if (result == ActionResult.CONSUME || result == ActionResult.SUCCESS) ignited = true;
|
||||||
|
|
||||||
// Reset slot
|
// Reset slot
|
||||||
mc.player.inventory.selectedSlot = preSlot;
|
mc.player.getInventory().selectedSlot = preSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private FindItemResult getFlintAndSteelSlot() {
|
private FindItemResult getFlintAndSteelSlot() {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class BoatGlitch extends Module {
|
|||||||
}
|
}
|
||||||
if (boat != null) {
|
if (boat != null) {
|
||||||
boat.noClip = true;
|
boat.noClip = true;
|
||||||
boat.pushSpeedReduction = 1;
|
//boat.pushSpeedReduction = 1;
|
||||||
dismountTicks = 5;
|
dismountTicks = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ public class BoatGlitch extends Module {
|
|||||||
if (remountTicks > 0) {
|
if (remountTicks > 0) {
|
||||||
remountTicks--;
|
remountTicks--;
|
||||||
if (remountTicks == 0) {
|
if (remountTicks == 0) {
|
||||||
mc.getNetworkHandler().sendPacket(new PlayerInteractEntityC2SPacket(boat, Hand.MAIN_HAND, false));
|
mc.getNetworkHandler().sendPacket( PlayerInteractEntityC2SPacket.interact(boat, false, Hand.MAIN_HAND));
|
||||||
if (toggleAfter.get()) {
|
if (toggleAfter.get()) {
|
||||||
toggle();
|
toggle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ public class BoatPhase extends Module {
|
|||||||
|
|
||||||
if (boat != null) {
|
if (boat != null) {
|
||||||
boat.noClip = true;
|
boat.noClip = true;
|
||||||
boat.pushSpeedReduction = 1;
|
//boat.pushSpeedReduction = 1;
|
||||||
|
|
||||||
if (lockYaw.get()) {
|
if (lockYaw.get()) {
|
||||||
boat.yaw = mc.player.yaw;
|
boat.setYaw(mc.player.getYaw());
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3d vel;
|
Vec3d vel;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
import net.minecraft.world.RaycastContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
|
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import minegame159.meteorclient.events.render.RenderEvent;
|
import minegame159.meteorclient.events.render.Render3DEvent;
|
||||||
import minegame159.meteorclient.events.world.TickEvent;
|
import minegame159.meteorclient.events.world.TickEvent;
|
||||||
import minegame159.meteorclient.settings.BoolSetting;
|
import minegame159.meteorclient.settings.BoolSetting;
|
||||||
import minegame159.meteorclient.settings.EnumSetting;
|
import minegame159.meteorclient.settings.EnumSetting;
|
||||||
@@ -122,10 +122,10 @@ public class Confuse extends Module {
|
|||||||
double z = r.nextDouble() * 6 - 3;
|
double z = r.nextDouble() * 6 - 3;
|
||||||
Vec3d addend = new Vec3d(x, y, z);
|
Vec3d addend = new Vec3d(x, y, z);
|
||||||
Vec3d goal = entityPos.add(addend);
|
Vec3d goal = entityPos.add(addend);
|
||||||
if (!mc.world.getBlockState(new BlockPos(goal.x, goal.y, goal.z)).getBlock().is(Blocks.AIR)) {
|
if (mc.world.getBlockState(new BlockPos(goal.x, goal.y, goal.z)).getBlock() != Blocks.AIR) {
|
||||||
goal = new Vec3d(x, playerPos.y, z);
|
goal = new Vec3d(x, playerPos.y, z);
|
||||||
}
|
}
|
||||||
if (mc.world.getBlockState(new BlockPos(goal.x, goal.y, goal.z)).getBlock().is(Blocks.AIR)) {
|
if (mc.world.getBlockState(new BlockPos(goal.x, goal.y, goal.z)).getBlock() == Blocks.AIR) {
|
||||||
hit = mc.world.raycast(new RaycastContext(
|
hit = mc.world.raycast(new RaycastContext(
|
||||||
mc.player.getPos(),goal, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player
|
mc.player.getPos(),goal, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.ANY, mc.player
|
||||||
));
|
));
|
||||||
@@ -170,7 +170,7 @@ public class Confuse extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onRender(RenderEvent event) {
|
private void onRender(Render3DEvent event) {
|
||||||
if (target == null) return;
|
if (target == null) return;
|
||||||
|
|
||||||
boolean flag = budgetGraphics.get();
|
boolean flag = budgetGraphics.get();
|
||||||
@@ -194,7 +194,7 @@ public class Confuse extends Module {
|
|||||||
double sin = Math.sin(rad) * 3;
|
double sin = Math.sin(rad) * 3;
|
||||||
double cos = Math.cos(rad) * 3;
|
double cos = Math.cos(rad) * 3;
|
||||||
Vec3d c = new Vec3d(tp.x + sin, tp.y + target.getHeight() / 2, tp.z + cos);
|
Vec3d c = new Vec3d(tp.x + sin, tp.y + target.getHeight() / 2, tp.z + cos);
|
||||||
if (last != null) RenderUtils.drawLine(last, c.x, c.y, c.z, c1, event);
|
if (last != null) event.renderer.line(last.x, last.y, last.z, c.x, c.y, c.z, c1);
|
||||||
last = c;
|
last = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import minegame159.meteorclient.utils.misc.Keybind;
|
|||||||
import net.minecraft.client.render.debug.DebugRenderer;
|
import net.minecraft.client.render.debug.DebugRenderer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.nbt.StringTag;
|
import net.minecraft.nbt.NbtString;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -98,12 +98,12 @@ public class InteractionMenu extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundTag toTag() {
|
public NbtCompound toTag() {
|
||||||
CompoundTag tag = super.toTag();
|
NbtCompound tag = super.toTag();
|
||||||
|
|
||||||
CompoundTag messTag = new CompoundTag();
|
NbtCompound messTag = new NbtCompound();
|
||||||
messages.keySet().forEach((key) -> {
|
messages.keySet().forEach((key) -> {
|
||||||
messTag.put(key, StringTag.of(messages.get(key)));
|
messTag.put(key, NbtString.of(messages.get(key)));
|
||||||
});
|
});
|
||||||
|
|
||||||
tag.put("messages", messTag);
|
tag.put("messages", messTag);
|
||||||
@@ -111,10 +111,10 @@ public class InteractionMenu extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Module fromTag(CompoundTag tag) {
|
public Module fromTag(NbtCompound tag) {
|
||||||
|
|
||||||
if (tag.contains("messages")) {
|
if (tag.contains("messages")) {
|
||||||
CompoundTag msgs = tag.getCompound("messages");
|
NbtCompound msgs = tag.getCompound("messages");
|
||||||
msgs.getKeys().forEach((key) -> {
|
msgs.getKeys().forEach((key) -> {
|
||||||
messages.put(key, msgs.getString(key));
|
messages.put(key, msgs.getString(key));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package cloudburst.rejects.modules;
|
|||||||
|
|
||||||
import cloudburst.rejects.MeteorRejectsAddon;
|
import cloudburst.rejects.MeteorRejectsAddon;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import minegame159.meteorclient.events.render.RenderEvent;
|
import minegame159.meteorclient.events.render.Render3DEvent;
|
||||||
import minegame159.meteorclient.events.world.TickEvent;
|
import minegame159.meteorclient.events.world.TickEvent;
|
||||||
import minegame159.meteorclient.systems.modules.Module;
|
import minegame159.meteorclient.systems.modules.Module;
|
||||||
import minegame159.meteorclient.rendering.Renderer;
|
import minegame159.meteorclient.renderer.ShapeMode;
|
||||||
import minegame159.meteorclient.rendering.ShapeMode;
|
|
||||||
import minegame159.meteorclient.settings.IntSetting;
|
import minegame159.meteorclient.settings.IntSetting;
|
||||||
import minegame159.meteorclient.settings.Setting;
|
import minegame159.meteorclient.settings.Setting;
|
||||||
import minegame159.meteorclient.settings.SettingGroup;
|
import minegame159.meteorclient.settings.SettingGroup;
|
||||||
@@ -179,7 +178,7 @@ public class Lavacast extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onRender(RenderEvent event) {
|
private void onRender(Render3DEvent event) {
|
||||||
if (placeFluidPos == null) return;
|
if (placeFluidPos == null) return;
|
||||||
double x1 = placeFluidPos.getX();
|
double x1 = placeFluidPos.getX();
|
||||||
double y1 = placeFluidPos.getY();
|
double y1 = placeFluidPos.getY();
|
||||||
@@ -196,7 +195,7 @@ public class Lavacast extends Module {
|
|||||||
SettingColor color1 = color;
|
SettingColor color1 = color;
|
||||||
color1.a = 75;
|
color1.a = 75;
|
||||||
|
|
||||||
Renderer.boxWithLines(Renderer.NORMAL, Renderer.LINES, x1, y1, z1, x2, y2, z2, color1, color, ShapeMode.Both, 0);
|
event.renderer.box(x1, y1, z1, x2, y2, z2, color1, color, ShapeMode.Both, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void placeLava() {
|
private void placeLava() {
|
||||||
@@ -206,10 +205,10 @@ public class Lavacast extends Module {
|
|||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int prevSlot = mc.player.inventory.selectedSlot;
|
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||||
mc.player.inventory.selectedSlot = findItemResult.getSlot();
|
mc.player.getInventory().selectedSlot = findItemResult.getSlot();
|
||||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||||
mc.player.inventory.selectedSlot = prevSlot;
|
mc.player.getInventory().selectedSlot = prevSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void placeWater() {
|
private void placeWater() {
|
||||||
@@ -219,10 +218,10 @@ public class Lavacast extends Module {
|
|||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int prevSlot = mc.player.inventory.selectedSlot;
|
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||||
mc.player.inventory.selectedSlot = findItemResult.getSlot();
|
mc.player.getInventory().selectedSlot = findItemResult.getSlot();
|
||||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||||
mc.player.inventory.selectedSlot = prevSlot;
|
mc.player.getInventory().selectedSlot = prevSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pickupLiquid() {
|
private void pickupLiquid() {
|
||||||
@@ -232,10 +231,10 @@ public class Lavacast extends Module {
|
|||||||
toggle();
|
toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int prevSlot = mc.player.inventory.selectedSlot;
|
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||||
mc.player.inventory.selectedSlot = findItemResult.getSlot();
|
mc.player.getInventory().selectedSlot = findItemResult.getSlot();
|
||||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||||
mc.player.inventory.selectedSlot = prevSlot;
|
mc.player.getInventory().selectedSlot = prevSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateBlockBreakingProgress() {
|
private void updateBlockBreakingProgress() {
|
||||||
|
|||||||
@@ -3,15 +3,14 @@ package cloudburst.rejects.modules;
|
|||||||
import cloudburst.rejects.MeteorRejectsAddon;
|
import cloudburst.rejects.MeteorRejectsAddon;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import minegame159.meteorclient.events.packets.PacketEvent;
|
import minegame159.meteorclient.events.packets.PacketEvent;
|
||||||
import minegame159.meteorclient.events.render.RenderEvent;
|
import minegame159.meteorclient.events.render.Render3DEvent;
|
||||||
import minegame159.meteorclient.rendering.Renderer;
|
import minegame159.meteorclient.renderer.ShapeMode;
|
||||||
import minegame159.meteorclient.rendering.ShapeMode;
|
|
||||||
import minegame159.meteorclient.settings.*;
|
import minegame159.meteorclient.settings.*;
|
||||||
import minegame159.meteorclient.systems.modules.Module;
|
import minegame159.meteorclient.systems.modules.Module;
|
||||||
import minegame159.meteorclient.utils.render.color.Color;
|
import minegame159.meteorclient.utils.render.color.Color;
|
||||||
import minegame159.meteorclient.utils.render.color.SettingColor;
|
import minegame159.meteorclient.utils.render.color.SettingColor;
|
||||||
import net.minecraft.fluid.FluidState;
|
import net.minecraft.fluid.FluidState;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.network.packet.s2c.play.*;
|
import net.minecraft.network.packet.s2c.play.*;
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
import net.minecraft.world.chunk.WorldChunk;
|
import net.minecraft.world.chunk.WorldChunk;
|
||||||
@@ -61,12 +60,12 @@ public class NewChunks extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onRender(RenderEvent event) {
|
private void onRender(Render3DEvent event) {
|
||||||
if (newChunksColor.get().a>3) {
|
if (newChunksColor.get().a>3) {
|
||||||
synchronized (newChunks) {
|
synchronized (newChunks) {
|
||||||
for (ChunkPos c : newChunks) {
|
for (ChunkPos c : newChunks) {
|
||||||
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
||||||
drawBoxOutline(new Box(c.getStartPos(), c.getStartPos().add(16, 0, 16)), newChunksColor.get());
|
drawBoxOutline(new Box(c.getStartPos(), c.getStartPos().add(16, 0, 16)), newChunksColor.get(), event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,15 +75,15 @@ public class NewChunks extends Module {
|
|||||||
synchronized (oldChunks) {
|
synchronized (oldChunks) {
|
||||||
for (ChunkPos c : oldChunks) {
|
for (ChunkPos c : oldChunks) {
|
||||||
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
||||||
drawBoxOutline(new Box(c.getStartPos(), c.getStartPos().add(16, 0, 16)), oldChunksColor.get());
|
drawBoxOutline(new Box(c.getStartPos(), c.getStartPos().add(16, 0, 16)), oldChunksColor.get(), event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawBoxOutline(Box box, Color color) {
|
private void drawBoxOutline(Box box, Color color, Render3DEvent event) {
|
||||||
Renderer.boxWithLines(Renderer.NORMAL, Renderer.LINES,
|
event.renderer.box(
|
||||||
box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ,
|
box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ,
|
||||||
new Color(0,0,0,0), color, ShapeMode.Lines, 0
|
new Color(0,0,0,0), color, ShapeMode.Lines, 0
|
||||||
);
|
);
|
||||||
@@ -131,7 +130,7 @@ public class NewChunks extends Module {
|
|||||||
|
|
||||||
if (!newChunks.contains(pos) && mc.world.getChunkManager().getChunk(packet.getX(), packet.getZ()) == null) {
|
if (!newChunks.contains(pos) && mc.world.getChunkManager().getChunk(packet.getX(), packet.getZ()) == null) {
|
||||||
WorldChunk chunk = new WorldChunk(mc.world, pos, null);
|
WorldChunk chunk = new WorldChunk(mc.world, pos, null);
|
||||||
chunk.loadFromPacket(null, packet.getReadBuffer(), new CompoundTag(), packet.getVerticalStripBitmask());
|
chunk.loadFromPacket(null, packet.getReadBuffer(), new NbtCompound(), packet.getVerticalStripBitmask());
|
||||||
|
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int y = 0; y < mc.world.getHeight(); y++) {
|
for (int y = 0; y < mc.world.getHeight(); y++) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ObsidianFarm extends Module {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mc.player.inventory.selectedSlot = pickAxe;
|
mc.player.getInventory().selectedSlot = pickAxe;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockPos obsidian = findObsidian();
|
BlockPos obsidian = findObsidian();
|
||||||
@@ -109,8 +109,8 @@ public class ObsidianFarm extends Module {
|
|||||||
private int findPickAxe() {
|
private int findPickAxe() {
|
||||||
int result = -1;
|
int result = -1;
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
if (mc.player.inventory.getStack(i).getItem() == Items.NETHERITE_PICKAXE) return i;
|
if (mc.player.getInventory().getStack(i).getItem() == Items.NETHERITE_PICKAXE) return i;
|
||||||
if (mc.player.inventory.getStack(i).getItem() == Items.DIAMOND_PICKAXE) result = i;
|
if (mc.player.getInventory().getStack(i).getItem() == Items.DIAMOND_PICKAXE) result = i;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ public class PacketFly extends Module {
|
|||||||
BlockPos pos = new BlockPos(mc.player.getPos().x, mc.player.getPos().y, mc.player.getPos().z);
|
BlockPos pos = new BlockPos(mc.player.getPos().x, mc.player.getPos().y, mc.player.getPos().z);
|
||||||
PlayerPositionLookS2CPacket packet = (PlayerPositionLookS2CPacket) event.packet;
|
PlayerPositionLookS2CPacket packet = (PlayerPositionLookS2CPacket) event.packet;
|
||||||
if (setYaw.get()) {
|
if (setYaw.get()) {
|
||||||
((PlayerPositionLookS2CPacketAccessor) event.packet).setPitch(mc.player.pitch);
|
((PlayerPositionLookS2CPacketAccessor) event.packet).setPitch(mc.player.getPitch());
|
||||||
((PlayerPositionLookS2CPacketAccessor) event.packet).setYaw(mc.player.yaw);
|
((PlayerPositionLookS2CPacketAccessor) event.packet).setYaw(mc.player.getYaw());
|
||||||
}
|
}
|
||||||
if (setID.get()) {
|
if (setID.get()) {
|
||||||
teleportID = packet.getTeleportId();
|
teleportID = packet.getTeleportId();
|
||||||
@@ -194,9 +194,9 @@ public class PacketFly extends Module {
|
|||||||
Vec3d vec = new Vec3d(x, y, z);
|
Vec3d vec = new Vec3d(x, y, z);
|
||||||
Vec3d position = mc.player.getPos().add(vec);
|
Vec3d position = mc.player.getPos().add(vec);
|
||||||
Vec3d outOfBoundsVec = outOfBoundsVec(vec, position);
|
Vec3d outOfBoundsVec = outOfBoundsVec(vec, position);
|
||||||
packetSender(new PlayerMoveC2SPacket.PositionOnly(position.x, position.y, position.z, mc.player.isOnGround()));
|
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(position.x, position.y, position.z, mc.player.isOnGround()));
|
||||||
if (invalidPacket.get()) {
|
if (invalidPacket.get()) {
|
||||||
packetSender(new PlayerMoveC2SPacket.PositionOnly(outOfBoundsVec.x, outOfBoundsVec.y, outOfBoundsVec.z, mc.player.isOnGround()));
|
packetSender(new PlayerMoveC2SPacket.PositionAndOnGround(outOfBoundsVec.x, outOfBoundsVec.y, outOfBoundsVec.z, mc.player.isOnGround()));
|
||||||
}
|
}
|
||||||
if (setPos.get()) {
|
if (setPos.get()) {
|
||||||
mc.player.setPos(position.x, position.y, position.z);
|
mc.player.setPos(position.x, position.y, position.z);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package cloudburst.rejects.modules;
|
|||||||
import cloudburst.rejects.MeteorRejectsAddon;
|
import cloudburst.rejects.MeteorRejectsAddon;
|
||||||
import cloudburst.rejects.utils.Render3DUtils;
|
import cloudburst.rejects.utils.Render3DUtils;
|
||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import minegame159.meteorclient.events.render.RenderEvent;
|
import minegame159.meteorclient.events.render.Render3DEvent;
|
||||||
import minegame159.meteorclient.settings.*;
|
import minegame159.meteorclient.settings.*;
|
||||||
import minegame159.meteorclient.systems.modules.Module;
|
import minegame159.meteorclient.systems.modules.Module;
|
||||||
import minegame159.meteorclient.systems.modules.Modules;
|
import minegame159.meteorclient.systems.modules.Modules;
|
||||||
@@ -13,13 +13,13 @@ import minegame159.meteorclient.utils.render.color.Color;
|
|||||||
import minegame159.meteorclient.utils.render.color.SettingColor;
|
import minegame159.meteorclient.utils.render.color.SettingColor;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.options.Perspective;
|
import net.minecraft.client.option.Perspective;
|
||||||
import net.minecraft.client.render.*;
|
import net.minecraft.client.render.*;
|
||||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
@@ -42,7 +42,7 @@ public class SkeletonESP extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void onRender(RenderEvent event) {
|
private void onRender(Render3DEvent event) {
|
||||||
MatrixStack matrixStack = event.matrices;
|
MatrixStack matrixStack = event.matrices;
|
||||||
float g = event.tickDelta;
|
float g = event.tickDelta;
|
||||||
Render3DUtils.setup3DRender(true);
|
Render3DUtils.setup3DRender(true);
|
||||||
@@ -64,7 +64,7 @@ public class SkeletonESP extends Module {
|
|||||||
float p = MathHelper.lerp(g, playerEntity.lastLimbDistance, playerEntity.limbDistance);
|
float p = MathHelper.lerp(g, playerEntity.lastLimbDistance, playerEntity.limbDistance);
|
||||||
float o = (float)playerEntity.age + g;
|
float o = (float)playerEntity.age + g;
|
||||||
float k = j - h;
|
float k = j - h;
|
||||||
float m = MathHelper.lerp(g, playerEntity.prevPitch, playerEntity.pitch);
|
float m = MathHelper.lerp(g, playerEntity.prevPitch, playerEntity.getPitch());
|
||||||
|
|
||||||
playerEntityModel.setAngles(playerEntity, q, p, o, k, m);
|
playerEntityModel.setAngles(playerEntity, q, p, o, k, m);
|
||||||
boolean sneaking = playerEntity.isSneaking();
|
boolean sneaking = playerEntity.isSneaking();
|
||||||
@@ -76,9 +76,9 @@ public class SkeletonESP extends Module {
|
|||||||
ModelPart rightLeg = playerEntityModel.rightLeg;
|
ModelPart rightLeg = playerEntityModel.rightLeg;
|
||||||
|
|
||||||
matrixStack.translate(footPos.x, footPos.y, footPos.z);
|
matrixStack.translate(footPos.x, footPos.y, footPos.z);
|
||||||
matrixStack.multiply(new Quaternion(new Vector3f(0, -1, 0), playerEntity.bodyYaw + 180, true));
|
matrixStack.multiply(new Quaternion(new Vec3f(0, -1, 0), playerEntity.bodyYaw + 180, true));
|
||||||
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||||
bufferBuilder.begin(1, VertexFormats.POSITION_COLOR);
|
bufferBuilder.begin(VertexFormat.DrawMode.LINES, VertexFormats.POSITION_COLOR);
|
||||||
|
|
||||||
Matrix4f matrix4f = matrixStack.peek().getModel();
|
Matrix4f matrix4f = matrixStack.peek().getModel();
|
||||||
bufferBuilder.vertex(matrix4f, 0, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
|
bufferBuilder.vertex(matrix4f, 0, sneaking ? 0.6f : 0.7f, sneaking ? 0.23f : 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
|
||||||
@@ -133,7 +133,7 @@ public class SkeletonESP extends Module {
|
|||||||
bufferBuilder.end();
|
bufferBuilder.end();
|
||||||
BufferRenderer.draw(bufferBuilder);
|
BufferRenderer.draw(bufferBuilder);
|
||||||
|
|
||||||
matrixStack.multiply(new Quaternion(new Vector3f(0, 1, 0), playerEntity.bodyYaw + 180, true));
|
matrixStack.multiply(new Quaternion(new Vec3f(0, 1, 0), playerEntity.bodyYaw + 180, true));
|
||||||
matrixStack.translate(-footPos.x, -footPos.y, -footPos.z);
|
matrixStack.translate(-footPos.x, -footPos.y, -footPos.z);
|
||||||
});
|
});
|
||||||
Render3DUtils.end3DRender();
|
Render3DUtils.end3DRender();
|
||||||
@@ -141,15 +141,15 @@ public class SkeletonESP extends Module {
|
|||||||
|
|
||||||
private void rotate(MatrixStack matrix, ModelPart modelPart) {
|
private void rotate(MatrixStack matrix, ModelPart modelPart) {
|
||||||
if (modelPart.roll != 0.0F) {
|
if (modelPart.roll != 0.0F) {
|
||||||
matrix.multiply(Vector3f.POSITIVE_Z.getRadialQuaternion(modelPart.roll));
|
matrix.multiply(Vec3f.POSITIVE_Z.getRadialQuaternion(modelPart.roll));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modelPart.yaw != 0.0F) {
|
if (modelPart.yaw != 0.0F) {
|
||||||
matrix.multiply(Vector3f.NEGATIVE_Y.getRadialQuaternion(modelPart.yaw));
|
matrix.multiply(Vec3f.NEGATIVE_Y.getRadialQuaternion(modelPart.yaw));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modelPart.pitch != 0.0F) {
|
if (modelPart.pitch != 0.0F) {
|
||||||
matrix.multiply(Vector3f.NEGATIVE_X.getRadialQuaternion(modelPart.pitch));
|
matrix.multiply(Vec3f.NEGATIVE_X.getRadialQuaternion(modelPart.pitch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class SpawnProofer extends Module {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Check if light source
|
// Check if light source
|
||||||
if (isLightSource(Block.getBlockFromItem(mc.player.inventory.getStack(block.getSlot()).getItem()))) {
|
if (isLightSource(Block.getBlockFromItem(mc.player.getInventory().getStack(block.getSlot()).getItem()))) {
|
||||||
|
|
||||||
// Find lowest light level
|
// Find lowest light level
|
||||||
int lowestLightLevel = 16;
|
int lowestLightLevel = 16;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import minegame159.meteorclient.utils.player.ChatUtils;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.nbt.StringNbtReader;
|
import net.minecraft.nbt.StringNbtReader;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -273,9 +273,9 @@ public class GiveUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (container.equals("egg")) {
|
if (container.equals("egg")) {
|
||||||
CompoundTag ct = new CompoundTag();
|
NbtCompound ct = new NbtCompound();
|
||||||
ct.put("EntityTag", StringNbtReader.parse("{Time:1,id:\"minecraft:falling_block\",BlockState:{Name:\"minecraft:chest\"}}"));
|
ct.put("EntityTag", StringNbtReader.parse("{Time:1,id:\"minecraft:falling_block\",BlockState:{Name:\"minecraft:chest\"}}"));
|
||||||
((CompoundTag) ct.get("EntityTag")).put("TileEntityData", item.getTag().get("BlockEntityTag"));
|
((NbtCompound) ct.get("EntityTag")).put("TileEntityData", item.getTag().get("BlockEntityTag"));
|
||||||
ct.put("display", item.getTag().get("display"));
|
ct.put("display", item.getTag().get("display"));
|
||||||
item = new ItemStack(Items.STRIDER_SPAWN_EGG);
|
item = new ItemStack(Items.STRIDER_SPAWN_EGG);
|
||||||
item.setTag(ct);
|
item.setTag(ct);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import minegame159.meteorclient.utils.render.color.Color;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.render.*;
|
import net.minecraft.client.render.*;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.ItemEntity;
|
import net.minecraft.entity.ItemEntity;
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
@@ -83,7 +83,7 @@ public class Render3DUtils {
|
|||||||
setup3DRender(!testDepth);
|
setup3DRender(!testDepth);
|
||||||
for (alpha = 0.0f; alpha < Math.PI; alpha += PI / gradation) {
|
for (alpha = 0.0f; alpha < Math.PI; alpha += PI / gradation) {
|
||||||
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||||
bufferBuilder.begin(1, VertexFormats.POSITION_COLOR);
|
bufferBuilder.begin(VertexFormat.DrawMode.LINES, VertexFormats.POSITION_COLOR);
|
||||||
for (beta = 0.0f; beta < 2.01f * Math.PI; beta += PI / gradation) {
|
for (beta = 0.0f; beta < 2.01f * Math.PI; beta += PI / gradation) {
|
||||||
x = (float) (pos.getX() + (radius * Math.cos(beta) * Math.sin(alpha)));
|
x = (float) (pos.getX() + (radius * Math.cos(beta) * Math.sin(alpha)));
|
||||||
y = (float) (pos.getY() + (radius * Math.sin(beta) * Math.sin(alpha)));
|
y = (float) (pos.getY() + (radius * Math.sin(beta) * Math.sin(alpha)));
|
||||||
@@ -129,10 +129,10 @@ public class Render3DUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void drawEntityBox(MatrixStack matrixStack, Entity entity, double x, double y, double z, Color color) {
|
public static void drawEntityBox(MatrixStack matrixStack, Entity entity, double x, double y, double z, Color color) {
|
||||||
float yaw = MathHelper.lerpAngleDegrees(mc.getTickDelta(), entity.prevYaw, entity.yaw);
|
float yaw = MathHelper.lerpAngleDegrees(mc.getTickDelta(), entity.prevYaw, entity.getYaw());
|
||||||
setup3DRender(true);
|
setup3DRender(true);
|
||||||
matrixStack.translate(x, y, z);
|
matrixStack.translate(x, y, z);
|
||||||
matrixStack.multiply(new Quaternion(new Vector3f(0, -1, 0), yaw, true));
|
matrixStack.multiply(new Quaternion(new Vec3f(0, -1, 0), yaw, true));
|
||||||
matrixStack.translate(-x, -y, -z);
|
matrixStack.translate(-x, -y, -z);
|
||||||
|
|
||||||
Box bb = new Box(x - entity.getWidth() + 0.25, y, z - entity.getWidth() + 0.25, x + entity.getWidth() - 0.25, y + entity.getHeight() + 0.1, z + entity.getWidth() - 0.25);
|
Box bb = new Box(x - entity.getWidth() + 0.25, y, z - entity.getWidth() + 0.25, x + entity.getWidth() - 0.25, y + entity.getHeight() + 0.1, z + entity.getWidth() - 0.25);
|
||||||
@@ -145,7 +145,7 @@ public class Render3DUtils {
|
|||||||
|
|
||||||
end3DRender();
|
end3DRender();
|
||||||
matrixStack.translate(x, y, z);
|
matrixStack.translate(x, y, z);
|
||||||
matrixStack.multiply(new Quaternion(new Vector3f(0, 1, 0), yaw, true));
|
matrixStack.multiply(new Quaternion(new Vec3f(0, 1, 0), yaw, true));
|
||||||
matrixStack.translate(-x, -y, -z);
|
matrixStack.translate(-x, -y, -z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ public class Render3DUtils {
|
|||||||
Matrix4f matrix4f = matrixStack.peek().getModel();
|
Matrix4f matrix4f = matrixStack.peek().getModel();
|
||||||
|
|
||||||
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||||
bufferBuilder.begin(7/*QUADS*/, VertexFormats.POSITION_COLOR);
|
bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR);
|
||||||
float minX = (float)bb.minX;
|
float minX = (float)bb.minX;
|
||||||
float minY = (float)bb.minY;
|
float minY = (float)bb.minY;
|
||||||
float minZ = (float)bb.minZ;
|
float minZ = (float)bb.minZ;
|
||||||
@@ -202,7 +202,7 @@ public class Render3DUtils {
|
|||||||
Matrix4f matrix4f = matrixStack.peek().getModel();
|
Matrix4f matrix4f = matrixStack.peek().getModel();
|
||||||
|
|
||||||
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||||
bufferBuilder.begin(1/*LINES*/, VertexFormats.POSITION_COLOR);
|
bufferBuilder.begin(VertexFormat.DrawMode.LINES, VertexFormats.POSITION_COLOR);
|
||||||
|
|
||||||
VoxelShape shape = VoxelShapes.cuboid(bb);
|
VoxelShape shape = VoxelShapes.cuboid(bb);
|
||||||
shape.forEachEdge((x1, y1, z1, x2, y2, z2) -> {
|
shape.forEachEdge((x1, y1, z1, x2, y2, z2) -> {
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ public class WorldUtils {
|
|||||||
double d = pos1.getX() - pos2.getX();
|
double d = pos1.getX() - pos2.getX();
|
||||||
double e = pos1.getY() - pos2.getY();
|
double e = pos1.getY() - pos2.getY();
|
||||||
double f = pos1.getZ() - pos2.getZ();
|
double f = pos1.getZ() - pos2.getZ();
|
||||||
return MathHelper.sqrt(d * d + e * e + f * f);
|
return MathHelper.sqrt((float) (d * d + e * e + f * f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package cloudburst.rejects.utils.gui;
|
|||||||
import cloudburst.rejects.mixin.meteor.GuiRendererAccessor;
|
import cloudburst.rejects.mixin.meteor.GuiRendererAccessor;
|
||||||
import minegame159.meteorclient.gui.renderer.GuiRenderer;
|
import minegame159.meteorclient.gui.renderer.GuiRenderer;
|
||||||
import minegame159.meteorclient.gui.widgets.WWidget;
|
import minegame159.meteorclient.gui.widgets.WWidget;
|
||||||
import minegame159.meteorclient.rendering.MeshBuilder;
|
import minegame159.meteorclient.renderer.Renderer2D;
|
||||||
import minegame159.meteorclient.utils.render.color.Color;
|
import minegame159.meteorclient.utils.render.color.Color;
|
||||||
|
|
||||||
public class GuiUtils {
|
public class GuiUtils {
|
||||||
public static void quadRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round, boolean roundTop) {
|
public static void quadRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round, boolean roundTop) {
|
||||||
MeshBuilder mb = ((GuiRendererAccessor)renderer).getMeshbuilder();
|
Renderer2D mb = ((GuiRendererAccessor)renderer).getRenderer2D();
|
||||||
RoundedMeshBuilder.quadRounded(mb, x, y, width, height, color, round, roundTop);
|
RoundedRenderer2D.quadRounded(mb, x, y, width, height, color, round, roundTop);
|
||||||
}
|
}
|
||||||
public static void quadRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round) {
|
public static void quadRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round) {
|
||||||
quadRounded(renderer, x, y, width, height, color, round, true);
|
quadRounded(renderer, x, y, width, height, color, round, true);
|
||||||
@@ -18,25 +18,25 @@ public class GuiUtils {
|
|||||||
quadRounded(renderer, widget.x, widget.y, widget.width, widget.height, color, round);
|
quadRounded(renderer, widget.x, widget.y, widget.width, widget.height, color, round);
|
||||||
}
|
}
|
||||||
public static void quadOutlineRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round, double s) {
|
public static void quadOutlineRounded(GuiRenderer renderer, double x, double y, double width, double height, Color color, int round, double s) {
|
||||||
MeshBuilder mb = ((GuiRendererAccessor)renderer).getMeshbuilder();
|
Renderer2D mb = ((GuiRendererAccessor)renderer).getRenderer2D();
|
||||||
RoundedMeshBuilder.quadRoundedOutline(mb, x, y, width, height, color, round, s);
|
RoundedRenderer2D.quadRoundedOutline(mb, x, y, width, height, color, round, s);
|
||||||
}
|
}
|
||||||
public static void quadOutlineRounded(GuiRenderer renderer, WWidget widget, Color color, int round, double s) {
|
public static void quadOutlineRounded(GuiRenderer renderer, WWidget widget, Color color, int round, double s) {
|
||||||
quadOutlineRounded(renderer, widget.x, widget.y, widget.width, widget.height, color, round, s);
|
quadOutlineRounded(renderer, widget.x, widget.y, widget.width, widget.height, color, round, s);
|
||||||
}
|
}
|
||||||
public static void quadRoundedSide(GuiRenderer renderer, double x, double y, double width, double height, Color color, int r, boolean right) {
|
public static void quadRoundedSide(GuiRenderer renderer, double x, double y, double width, double height, Color color, int r, boolean right) {
|
||||||
MeshBuilder mb = ((GuiRendererAccessor)renderer).getMeshbuilder();
|
Renderer2D mb = ((GuiRendererAccessor)renderer).getRenderer2D();
|
||||||
RoundedMeshBuilder.quadRoundedSide(mb, x, y, width, height, color, r, right);
|
RoundedRenderer2D.quadRoundedSide(mb, x, y, width, height, color, r, right);
|
||||||
}
|
}
|
||||||
public static void quadRoundedSide(GuiRenderer renderer, WWidget widget, Color color, int round, boolean right) {
|
public static void quadRoundedSide(GuiRenderer renderer, WWidget widget, Color color, int round, boolean right) {
|
||||||
quadRoundedSide(renderer, widget.x, widget.y, widget.width, widget.height, color, round, right);
|
quadRoundedSide(renderer, widget.x, widget.y, widget.width, widget.height, color, round, right);
|
||||||
}
|
}
|
||||||
public static void circlePart(GuiRenderer renderer, double x, double y, double r, double startAngle, double angle, Color color) {
|
public static void circlePart(GuiRenderer renderer, double x, double y, double r, double startAngle, double angle, Color color) {
|
||||||
MeshBuilder mb = ((GuiRendererAccessor)renderer).getMeshbuilder();
|
Renderer2D mb = ((GuiRendererAccessor)renderer).getRenderer2D();
|
||||||
RoundedMeshBuilder.circlePart(mb, x, y, r, startAngle, angle, color);
|
RoundedRenderer2D.circlePart(mb, x, y, r, startAngle, angle, color);
|
||||||
}
|
}
|
||||||
public static void circlePartOutline(GuiRenderer renderer, double x, double y, double r, double startAngle, double angle, Color color, double outlineWidth) {
|
public static void circlePartOutline(GuiRenderer renderer, double x, double y, double r, double startAngle, double angle, Color color, double outlineWidth) {
|
||||||
MeshBuilder mb = ((GuiRendererAccessor)renderer).getMeshbuilder();
|
Renderer2D mb = ((GuiRendererAccessor)renderer).getRenderer2D();
|
||||||
RoundedMeshBuilder.circlePartOutline(mb, x, y, r, startAngle, angle, color, outlineWidth);
|
RoundedRenderer2D.circlePartOutline(mb, x, y, r, startAngle, angle, color, outlineWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package cloudburst.rejects.utils.gui;
|
package cloudburst.rejects.utils.gui;
|
||||||
|
|
||||||
import minegame159.meteorclient.rendering.MeshBuilder;
|
import minegame159.meteorclient.renderer.Renderer2D;
|
||||||
import minegame159.meteorclient.utils.render.color.Color;
|
import minegame159.meteorclient.utils.render.color.Color;
|
||||||
|
|
||||||
public class RoundedMeshBuilder {
|
public class RoundedRenderer2D {
|
||||||
|
|
||||||
private static final double circleNone = 0;
|
private static final double circleNone = 0;
|
||||||
private static final double circleQuarter = Math.PI / 2;
|
private static final double circleQuarter = Math.PI / 2;
|
||||||
private static final double circleHalf = circleQuarter * 2;
|
private static final double circleHalf = circleQuarter * 2;
|
||||||
private static final double circleThreeQuarter = circleQuarter * 3;
|
private static final double circleThreeQuarter = circleQuarter * 3;
|
||||||
|
|
||||||
public static void quadRoundedOutline(MeshBuilder mb, double x, double y, double width, double height, Color color, int r, double s) {
|
public static void quadRoundedOutline(Renderer2D mb, double x, double y, double width, double height, Color color, int r, double s) {
|
||||||
r = getR(r, width, height);
|
r = getR(r, width, height);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
mb.quad(x, y, width, s, color);
|
mb.quad(x, y, width, s, color);
|
||||||
@@ -33,7 +33,7 @@ public class RoundedMeshBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void quadRounded(MeshBuilder mb, double x, double y, double width, double height, Color color, int r, boolean roundTop) {
|
public static void quadRounded(Renderer2D mb, double x, double y, double width, double height, Color color, int r, boolean roundTop) {
|
||||||
r = getR(r, width, height);
|
r = getR(r, width, height);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
mb.quad(x, y, width, height, color);
|
mb.quad(x, y, width, height, color);
|
||||||
@@ -57,7 +57,7 @@ public class RoundedMeshBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void quadRoundedSide(MeshBuilder mb, double x, double y, double width, double height, Color color, int r, boolean right) {
|
public static void quadRoundedSide(Renderer2D mb, double x, double y, double width, double height, Color color, int r, boolean right) {
|
||||||
r = getR(r, width, height);
|
r = getR(r, width, height);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
mb.quad(x, y, width, height, color);
|
mb.quad(x, y, width, height, color);
|
||||||
@@ -91,21 +91,21 @@ public class RoundedMeshBuilder {
|
|||||||
return Math.max(1, (int)(angle * r / circleQuarter));
|
return Math.max(1, (int)(angle * r / circleQuarter));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void circlePart(MeshBuilder mb, double x, double y, double r, double startAngle, double angle, Color color) {
|
public static void circlePart(Renderer2D mb, double x, double y, double r, double startAngle, double angle, Color color) {
|
||||||
int cirDepth = getCirDepth(r, angle);
|
int cirDepth = getCirDepth(r, angle);
|
||||||
double cirPart = angle / cirDepth;
|
double cirPart = angle / cirDepth;
|
||||||
vert2(mb,x + Math.sin(startAngle) * r, y - Math.cos(startAngle) * r, color);
|
int center = mb.triangles.vec2(x, y).color(color).next();
|
||||||
|
int prev = mb.triangles.vec2(x + Math.sin(startAngle) * r, y - Math.cos(startAngle) * r).color(color).next();
|
||||||
for (int i = 1; i < cirDepth + 1; i++) {
|
for (int i = 1; i < cirDepth + 1; i++) {
|
||||||
vert2(mb, x, y, color);
|
|
||||||
double xV = x + Math.sin(startAngle + cirPart * i) * r;
|
double xV = x + Math.sin(startAngle + cirPart * i) * r;
|
||||||
double yV = y - Math.cos(startAngle + cirPart * i) * r;
|
double yV = y - Math.cos(startAngle + cirPart * i) * r;
|
||||||
vert2(mb, xV, yV, color);
|
int next = mb.triangles.vec2(xV, yV).color(color).next();
|
||||||
if (i != cirDepth)
|
mb.triangles.quad(prev, center, next, next);
|
||||||
vert2(mb, xV, yV, color);
|
prev = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void circlePartOutline(MeshBuilder mb, double x, double y, double r, double startAngle, double angle, Color color, double outlineWidth) {
|
public static void circlePartOutline(Renderer2D mb, double x, double y, double r, double startAngle, double angle, Color color, double outlineWidth) {
|
||||||
int cirDepth = getCirDepth(r, angle);
|
int cirDepth = getCirDepth(r, angle);
|
||||||
double cirPart = angle / cirDepth;
|
double cirPart = angle / cirDepth;
|
||||||
for (int i = 0; i < cirDepth; i++) {
|
for (int i = 0; i < cirDepth; i++) {
|
||||||
@@ -117,18 +117,13 @@ public class RoundedMeshBuilder {
|
|||||||
double yON = y - Math.cos(startAngle + cirPart * (i + 1)) * r;
|
double yON = y - Math.cos(startAngle + cirPart * (i + 1)) * r;
|
||||||
double xIN = x + Math.sin(startAngle + cirPart * (i + 1)) * (r - outlineWidth);
|
double xIN = x + Math.sin(startAngle + cirPart * (i + 1)) * (r - outlineWidth);
|
||||||
double yIN = y - Math.cos(startAngle + cirPart * (i + 1)) * (r - outlineWidth);
|
double yIN = y - Math.cos(startAngle + cirPart * (i + 1)) * (r - outlineWidth);
|
||||||
//
|
|
||||||
vert2(mb, xOC, yOC, color);
|
mb.triangles.quad(
|
||||||
vert2(mb, xON, yON, color);
|
mb.triangles.vec2(xOC, yOC).color(color).next(),
|
||||||
vert2(mb, xIC, yIC, color);
|
mb.triangles.vec2(xON, yON).color(color).next(),
|
||||||
//
|
mb.triangles.vec2(xIC, yIC).color(color).next(),
|
||||||
vert2(mb, xIC, yIC, color);
|
mb.triangles.vec2(xIN, yIN).color(color).next()
|
||||||
vert2(mb, xON, yON, color);
|
);
|
||||||
vert2(mb, xIN, yIN, color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void vert2(MeshBuilder mb, double x, double y, Color c) {
|
|
||||||
mb.pos(x, y, 0).color(c).endVertex();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.7.4",
|
"fabricloader": ">=0.7.4",
|
||||||
"minecraft": "1.16.x",
|
"minecraft": "1.17",
|
||||||
"meteor-client": "*"
|
"meteor-client": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "cloudburst.rejects.mixin.meteor",
|
"package": "cloudburst.rejects.mixin.meteor",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"mixins": [ ],
|
"mixins": [ ],
|
||||||
"client": [
|
"client": [
|
||||||
"CapesAccessor",
|
"CapesAccessor",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "cloudburst.rejects.mixin",
|
"package": "cloudburst.rejects.mixin",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
|
|||||||
Reference in New Issue
Block a user