Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymoose77756 committed Jun 24, 2024
1 parent 526e224 commit de769fb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
minecraft_version=1.21
yarn_version=1.21+build.1
yarn_version=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version = 0.3
maven_group = anticope.rejects
archives_base_name = meteor-rejects-addon

meteor_version=0.5.7
baritone_version=1.20.4
meteor_version=0.5.8
baritone_version=1.20.6
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.client.network.ClientCommonNetworkHandler;
import net.minecraft.network.DisconnectionInfo;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -15,11 +16,11 @@
@Mixin(ClientCommonNetworkHandler.class)
public class ClientCommonNetwokHandlerMixin {
@Inject(method = "onDisconnected", at = @At("HEAD"), cancellable = true)
private void onDisconnected(Text reason, CallbackInfo info) {
private void onDisconnected(DisconnectionInfo info, CallbackInfo ci) {
if (Modules.get().isActive(SilentDisconnect.class) && mc.world != null && mc.player != null) {
ChatUtils.info(Text.translatable("disconnect.lost").getString() + ":");
ChatUtils.sendMsg(reason);
info.cancel();
ChatUtils.sendMsg(info.reason());
ci.cancel();
}
}
}
5 changes: 3 additions & 2 deletions src/main/java/anticope/rejects/mixin/GameRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import meteordevelopment.meteorclient.systems.modules.Modules;

import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.render.RenderTickCounter;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand All @@ -19,14 +20,14 @@ public class GameRendererMixin {
@Shadow @Final MinecraftClient client;

@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawEntityOutlinesFramebuffer()V", ordinal = 0))
private void renderShader(float tickDelta, long startTime, boolean tick, CallbackInfo ci) {
private void renderShader(RenderTickCounter tickCounter, boolean tick, CallbackInfo ci) {
Rendering renderingModule = Modules.get().get(Rendering.class);
if (renderingModule == null) return;
PostEffectProcessor shader = renderingModule.getShaderEffect();

if (shader != null) {
shader.setupDimensions(client.getWindow().getFramebufferWidth(), client.getWindow().getFramebufferHeight());
shader.render(tickDelta);
shader.render(tickCounter.getTickDelta(tick));
}
}
}
4 changes: 3 additions & 1 deletion src/main/java/anticope/rejects/modules/AutoGrind.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.registry.tag.EnchantmentTags;
import net.minecraft.screen.GrindstoneScreenHandler;

import java.util.List;
import java.util.Set;

public class AutoGrind extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
Expand All @@ -39,7 +41,7 @@ public class AutoGrind extends Module {
.build()
);

private final Setting<List<Enchantment>> enchantmentBlacklist = sgGeneral.add(new EnchantmentListSetting.Builder()
private final Setting<Set<RegistryKey<Enchantment>>> enchantmentBlacklist = sgGeneral.add(new EnchantmentListSetting.Builder()
.name("enchantment-blacklist")
.description("Enchantments that should be ignored.")
.defaultValue()
Expand Down
1 change: 1 addition & 0 deletions src/main/java/anticope/rejects/utils/GiveUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
import meteordevelopment.meteorclient.utils.Utils;
import net.minecraft.component.ComponentChanges;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.*;
Expand Down

0 comments on commit de769fb

Please sign in to comment.