Skip to content

Commit

Permalink
1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
c0nsolee committed Sep 28, 2024
1 parent 76ae792 commit b898cca
Show file tree
Hide file tree
Showing 46 changed files with 105 additions and 363 deletions.
69 changes: 16 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,81 +1,44 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17

version = project.mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name

base {
archivesName = project.archives_base_name
loom {
accessWidenerPath = file("src/main/resources/venomhack.accesswidener")
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven {
name = "meteor-maven"
url = "https://maven.meteordev.org/releases"
}
maven {
name = "meteor-maven-snapshots"
url = "https://maven.meteordev.org/snapshots"
}
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation files("meteor-client-0.5.1-1674_remap.jar");
modImplementation "meteordevelopment:meteor-client:${project.meteor_version}"
implementation 'org.joml:joml:1.10.8'
}

loom {
accessWidenerPath = file("src/main/resources/venomhack.accesswidener")
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": project.version, "mc_version": project.minecraft_version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}

// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
it.options.encoding("UTF-8")
}
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.28
loader_version=0.16.2
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.15.11

# Mod Properties
mod_version=1.0.0
mod_version=1.19.4
maven_group=com.venomhack
archives_base_name=venomhack

# Dependencies
fabric_version=0.77.0+1.19.2
fabric_version=0.87.2+1.19.4
meteor_version=0.5.3
4 changes: 1 addition & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file removed meteor-client-0.5.1-1674_remap.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/java/venomhack/Venomhack420.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.addons.MeteorAddon;
import meteordevelopment.meteorclient.systems.commands.Commands;
import meteordevelopment.meteorclient.commands.Commands;
import meteordevelopment.meteorclient.systems.config.Config;
import meteordevelopment.meteorclient.systems.hud.Hud;
import meteordevelopment.meteorclient.systems.hud.HudGroup;
Expand Down Expand Up @@ -104,8 +104,8 @@ private void initModules() {
modules.add(new VillagerTrader());
modules.add(new WaypointDeleter());
modules.add(new ItemDropper());
Commands.get().add(new LogoutSpotsCommand());
Commands.get().add(new HeadItemCommand());
Commands.add(new LogoutSpotsCommand());
Commands.add(new HeadItemCommand());
Hud hud = Hud.get();
hud.register(ItemHud.INFO);
hud.register(StatsHud.INFO);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/commands/HeadItemCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.systems.commands.Command;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import net.minecraft.screen.slot.SlotActionType;
import venomhack.utils.RandUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/commands/LogoutSpotsCommand.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package venomhack.commands;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.systems.commands.Command;
import meteordevelopment.meteorclient.commands.Command;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.meteorclient.utils.world.Dimension;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/mixins/ChatHudMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private boolean isChatFocused() {
}

@Inject(method = {"render"}, at = {@At("TAIL")})
private void renderTail(MatrixStack matrices, int currentTick, CallbackInfo ci) {
private void renderTail(MatrixStack matrices, int currentTick, int mouseX, int mouseY, CallbackInfo ci) {
if (Modules.get().get(ChatControl.class).isActive() && Modules.get().get(BetterChat.class).displayPlayerHeads() && MeteorClient.mc.options.getChatVisibility().getValue() != ChatVisibility.HIDDEN) {
int maxLineCount = MeteorClient.mc.inGameHud.getChatHud().getVisibleLineCount();
double d = MeteorClient.mc.options.getChatOpacity().getValue() * 0.9F + 0.1F;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/venomhack/mixins/ItemEntityRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.ItemEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.util.math.Quaternion;
import org.joml.Quaternionf;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -20,10 +20,10 @@ private void render(ItemEntity itemEntity, float f, float g, MatrixStack matrixS
DroppedItemsView dropped = Modules.get().get(DroppedItemsView.class);
if (dropped.isActive() && !itemEntity.getStack().isEmpty()) {
if (itemEntity.getStack().getItem() instanceof BlockItem) {
matrixStack.multiply(new Quaternion(dropped.rotationXBlocksDropped.get().floatValue(), dropped.rotationYBlocksDropped.get().floatValue(), dropped.rotationZBlocksDropped.get().floatValue(), dropped.rotationWBlocksDropped.get().floatValue()));
matrixStack.multiply(new Quaternionf(dropped.rotationXBlocksDropped.get().floatValue(), dropped.rotationYBlocksDropped.get().floatValue(), dropped.rotationZBlocksDropped.get().floatValue(), dropped.rotationWBlocksDropped.get().floatValue()));
matrixStack.scale(dropped.scaleXYZBlocksDropped.get().floatValue(), dropped.scaleXYZBlocksDropped.get().floatValue(), dropped.scaleXYZBlocksDropped.get().floatValue());
} else {
matrixStack.multiply(new Quaternion(dropped.rotationXDropped.get().floatValue(), dropped.rotationYDropped.get().floatValue(), dropped.rotationZDropped.get().floatValue(), dropped.rotationWDropped.get().floatValue()));
matrixStack.multiply(new Quaternionf(dropped.rotationXDropped.get().floatValue(), dropped.rotationYDropped.get().floatValue(), dropped.rotationZDropped.get().floatValue(), dropped.rotationWDropped.get().floatValue()));
matrixStack.scale(dropped.scaleXDropped.get().floatValue(), dropped.scaleYDropped.get().floatValue(), dropped.scaleZDropped.get().floatValue());
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/venomhack/mixins/meteor/AirPlaceMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private void onTick(CallbackInfo ci) {
}
}

@Redirect(method = {"onTick"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;method_7909()Lnet/minecraft/item/Item;", remap = true))
@Redirect(method = {"onTick"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;", remap = true))
private Item offhandSupport(ItemStack stack) {
Item var3 = MeteorClient.mc.player.getMainHandStack().getItem();
if (var3 instanceof BlockItem item) {
Expand Down Expand Up @@ -98,7 +98,7 @@ private void onRender(Renderer3D renderer, BlockPos pos, Color sideColor, Color
}
}

@Redirect(method = {"onRender"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;method_7909()Lnet/minecraft/item/Item;", remap = true))
@Redirect(method = {"onRender"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;", remap = true))
private Item offhandRender(ItemStack stack) {
Item var4 = MeteorClient.mc.player.getMainHandStack().getItem();
if (var4 instanceof BlockItem) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/mixins/meteor/InvUtilsMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@Mixin(value = {InvUtils.class}, remap = false)
public class InvUtilsMixin {
@Redirect(method = {"findFastestTool"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;method_7924(Lnet/minecraft/block/BlockState;)F"), remap = true)
@Redirect(method = {"findFastestTool"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getMiningSpeedMultiplier(Lnet/minecraft/block/BlockState;)F"), remap = true)
private static float findFastest(ItemStack itemStack, BlockState state) {
return !itemStack.isSuitableFor(state) ? -1.0F : itemStack.getMiningSpeedMultiplier(state);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/mixins/meteor/NoInteractMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket.Mode;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/venomhack/mixins/meteor/StepMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void onTick(Post event, CallbackInfo ci) {
@Unique
private void doNcpStep() {
assert mc.player != null;
mc.player.stepHeight = 0.6F;
mc.player.setStepHeight(0.6F);
switch (this.activeWhen.get()) {
case Sneaking -> {
if (!mc.player.isSneaking()) {
Expand All @@ -78,7 +78,7 @@ private void doNcpStep() {
}

if (!this.safeStep.get() || !(PlayerUtils.getTotalHealth() <= (double) this.stepHealth.get()) && !(PlayerUtils.getTotalHealth() - PlayerUtils.possibleHealthReductions() <= (double) this.stepHealth.get().intValue())) {
mc.player.stepHeight = (this.height.get().floatValue());
mc.player.setStepHeight(this.height.get().floatValue());
if (mc.player.horizontalCollision && mc.player.isOnGround() && !mc.player.isHoldingOntoLadder() && !mc.options.jumpKey.isPressed() && mc.player.fallDistance == 0.0F && (mc.player.forwardSpeed != 0.0F || mc.player.sidewaysSpeed != 0.0F)) {
for (double i = 1.0; i <= this.height.get(); i += 0.5) {
Box box = mc.player.getBoundingBox().offset(0.0, i, 0.0);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/venomhack/modules/ModuleHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Predicate;

Expand Down Expand Up @@ -540,7 +541,7 @@ public Setting<SettingColor> setting(String name, String description, int red, i
return group.add(new ColorSetting(name, description, new SettingColor(red, green, blue, alpha, rainbow), onChanged, onModuleActivated, visible));
}

public Setting<Object2BooleanMap<EntityType<?>>> setting(String name, String description, SettingGroup group, boolean onlyAttackable, IVisible visible, Consumer<Object2BooleanMap<EntityType<?>>> onChanged, Consumer<Setting<Object2BooleanMap<EntityType<?>>>> onModuleActivated, EntityType<?>... defaultValue) {
public Setting<Set<EntityType<?>>> setting(String name, String description, SettingGroup group, boolean onlyAttackable, IVisible visible, Consumer<Set<EntityType<?>>> onChanged, Consumer<Setting<Set<EntityType<?>>>> onModuleActivated, EntityType<?>... defaultValue) {
return group.add(new EntityTypeListSetting.Builder().name(name).description(description).defaultValue(defaultValue).onChanged(onChanged).onModuleActivated(onModuleActivated).visible(visible).build());
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/venomhack/modules/chat/AutoCope.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import meteordevelopment.meteorclient.gui.widgets.pressable.WButton;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.DeathMessageS2CPacket;
import venomhack.Venomhack420;
import venomhack.gui.screens.GuideScreen;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/venomhack/modules/chat/Greeter.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void onJoin(PlayerListChangeEvent.Join event) {
} else {
PlayerListEntry player = event.getPlayer();
GameProfile profile = player.getProfile();
if (this.onlyFriends.get() && !Friends.get().isFriend(new OtherClientPlayerEntity(this.mc.world, profile, player.getPublicKeyData()))) {
if (this.onlyFriends.get() && !Friends.get().isFriend(new OtherClientPlayerEntity(this.mc.world, profile))) {
return;
}

Expand Down Expand Up @@ -80,7 +80,7 @@ private void onLeave(PlayerListChangeEvent.Leave event) {
} else {
PlayerListEntry player = event.getPlayer();
GameProfile profile = player.getProfile();
if (this.onlyFriends.get() && !Friends.get().isFriend(new OtherClientPlayerEntity(this.mc.world, profile, player.getPublicKeyData()))) {
if (this.onlyFriends.get() && !Friends.get().isFriend(new OtherClientPlayerEntity(this.mc.world, profile))) {
return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/venomhack/modules/chat/Notifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.BlockBreakingProgressS2CPacket;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.MutableText;
Expand Down Expand Up @@ -62,7 +62,7 @@ public class Notifier extends ModuleHelper {
private final Setting<Boolean> effectNotifier = this.setting("effect-notifier", "Notifies you about certain effects.", Boolean.valueOf(false), this.sgGeneral);
private final Setting<Boolean> playSound = this.setting("play-sound", "Plays a sound when a player enters your render distance.", Boolean.valueOf(false), this.sgVisualRange, this.visualRange::get);
private final Setting<JoinLeaveEvent> event = this.setting("event", "When to log the entities.", JoinLeaveEvent.BOTH, this.sgVisualRange, this.visualRange::get);
private final Setting<Object2BooleanMap<EntityType<?>>> entities = this.setting("entities", "Which entities to nofity about.", this.sgVisualRange, true, this.visualRange::get, null, null, EntityType.PLAYER);
private final Setting<Set<EntityType<?>>> entities = this.setting("entities", "Which entities to nofity about.", this.sgVisualRange, true, this.visualRange::get, null, null, EntityType.PLAYER);
private final Setting<Boolean> visualRangeIgnoreFriends = this.setting("ignore-friends", "Ignores friends.", Boolean.valueOf(true), this.sgVisualRange, this.visualRange::get);
private final Setting<Boolean> burrowFriends = this.setting("friends", "Whether to notify when a friend gets an effect.", Boolean.valueOf(false), this.sgBurrow, this.burrowNotify::get);
private final Setting<Boolean> renderBurrow = this.setting("render-burrow", "Renders an overlay when someone burrows.", Boolean.valueOf(true), this.sgBurrow, this.burrowNotify::get);
Expand Down Expand Up @@ -96,7 +96,7 @@ public Notifier() {
@EventHandler
private void onEntityAdded(EntityAddedEvent event) {
Entity entity = event.entity;
if (this.visualRange.get() && this.event.get().join() && this.entities.get().keySet().contains(event.entity.getType()) && !entity.equals(this.mc.player)) {
if (this.visualRange.get() && this.event.get().join() && this.entities.get().contains(event.entity.getType()) && !entity.equals(this.mc.player)) {
if (event.entity instanceof PlayerEntity) {
if ((!this.visualRangeIgnoreFriends.get() || !Friends.get().isFriend((PlayerEntity) event.entity)) && !(event.entity instanceof FakePlayerEntity)) {
ChatUtils.sendMsg(event.entity.getId() + 100, this.title(), Formatting.LIGHT_PURPLE, Text.literal(event.entity.getEntityName()).append(Text.translatable("notifier.spawn").formatted(Formatting.RED)));
Expand All @@ -117,7 +117,7 @@ private void onEntityAdded(EntityAddedEvent event) {
@EventHandler
private void onEntityRemoved(EntityRemovedEvent event) {
Entity entity = event.entity;
if (this.visualRange.get() && this.event.get().leave() && !entity.equals(this.mc.player) && this.entities.get().keySet().contains(event.entity.getType())) {
if (this.visualRange.get() && this.event.get().leave() && !entity.equals(this.mc.player) && this.entities.get().contains(event.entity.getType())) {
if (event.entity instanceof PlayerEntity) {
if ((!this.visualRangeIgnoreFriends.get() || !Friends.get().isFriend((PlayerEntity) event.entity)) && !(event.entity instanceof FakePlayerEntity)) {
ChatUtils.sendMsg(event.entity.getId() + 100, this.title(), Formatting.LIGHT_PURPLE, Text.literal(event.entity.getEntityName()).append(Text.translatable("notifier.despawn").formatted(Formatting.DARK_GREEN)));
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/venomhack/modules/combat/AutoAnchor.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import meteordevelopment.meteorclient.systems.modules.movement.Blink;
import meteordevelopment.meteorclient.utils.entity.EntityUtils;
import meteordevelopment.meteorclient.utils.entity.SortPriority;
import meteordevelopment.meteorclient.utils.misc.Vec3;
import org.joml.Vector3d;
import org.joml.Vector3d;
import meteordevelopment.meteorclient.utils.player.*;
import meteordevelopment.meteorclient.utils.render.NametagUtils;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
Expand All @@ -33,6 +34,7 @@
import net.minecraft.util.math.BlockPos.Mutable;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import org.joml.Vector3d;
import venomhack.Venomhack420;
import venomhack.enums.RenderShape;
import venomhack.enums.Type;
Expand All @@ -43,10 +45,7 @@
import venomhack.utils.*;
import venomhack.utils.customObjects.RenderBlock;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.*;

public class AutoAnchor extends ModuleHelper implements IModule {
public final Setting<Boolean> holeDelays = this.setting("hole-delays", "Uses separate delays when the target is in a hole.", Boolean.valueOf(false));
Expand Down Expand Up @@ -459,7 +458,7 @@ private void onRender2D(Render2DEvent event) {
int preA = this.damageColor.get().a;
synchronized (this.renderBlocks) {
this.renderBlocks.forEach(damage -> {
Vec3 pos = new Vec3((double) damage.pos.getX() + 0.5, (double) damage.pos.getY() + this.yOffset.get() + this.height.get() * 0.5, (double) damage.pos.getZ() + 0.5);
Vector3d pos = new Vector3d((double) damage.pos.getX() + 0.5, (double) damage.pos.getY() + this.yOffset.get() + this.height.get() * 0.5, (double) damage.pos.getZ() + 0.5);
if (NametagUtils.to2D(pos, this.damageScale.get())) {
NametagUtils.begin(pos);
TextRenderer.get().begin(1.0, false, true);
Expand Down
Loading

0 comments on commit b898cca

Please sign in to comment.