Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major Highway Builder fixes and improvements. #4999

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.mixin;

import net.minecraft.inventory.Inventory;
import net.minecraft.screen.ShulkerBoxScreenHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(ShulkerBoxScreenHandler.class)
public interface ShulkerBoxScreenHandlerAccessor {
@Accessor("inventory")
Inventory meteor$getInventory();
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AutoEat extends Module {

// General

private final Setting<List<Item>> blacklist = sgGeneral.add(new ItemListSetting.Builder()
public final Setting<List<Item>> blacklist = sgGeneral.add(new ItemListSetting.Builder()
.name("blacklist")
.description("Which items to not eat.")
.defaultValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.world.HighwayBuilder;
import meteordevelopment.meteorclient.systems.modules.world.PacketMine;
import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
Expand Down Expand Up @@ -43,7 +44,6 @@ public class BreakIndicators extends Module {
.build()
);


private final Setting<SettingColor> startColor = sgGeneral.add(new ColorSetting.Builder()
.name("start-color")
.description("The color for the non-broken block.")
Expand Down Expand Up @@ -72,6 +72,25 @@ private void onRender(Render3DEvent event) {
if (packetMine.get() && !Modules.get().get(PacketMine.class).blocks.isEmpty()) {
renderPacket(event, Modules.get().get(PacketMine.class).blocks);
}

HighwayBuilder b = Modules.get().get(HighwayBuilder.class);
if (!b.isActive()) return;

if (b.normalMining != null) {
VoxelShape voxelShape = b.normalMining.blockState.getOutlineShape(mc.world, b.normalMining.blockPos);
if (voxelShape.isEmpty()) return;

double normalised = Math.min(1, b.normalMining.progress());
renderBlock(event, voxelShape.getBoundingBox(), b.normalMining.blockPos, 1 - normalised, normalised);
}

if (b.packetMining != null) {
VoxelShape voxelShape = b.packetMining.blockState.getOutlineShape(mc.world, b.packetMining.blockPos);
if (voxelShape.isEmpty()) return;

double normalised = Math.min(1, b.packetMining.progress());
renderBlock(event, voxelShape.getBoundingBox(), b.packetMining.blockPos, 1 - normalised, normalised);
}
}

private void renderNormal(Render3DEvent event) {
Expand Down
Loading
Loading