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

feat: Minecraft 1.21.4 #4980

Open
wants to merge 19 commits into
base: nextgen
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/run/
/mcef/
/logs/
/.kotlin/
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ plugins {
id "org.jetbrains.dokka" version "1.9.10"
}

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
base {
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
}

configurations {
includeDependency
Expand Down
6 changes: 0 additions & 6 deletions config/detekt/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<ID>BracesOnIfStatements:FlyGrim2859V.kt$FlyGrim2859V$if</ID>
<ID>BracesOnIfStatements:ItemImageAtlas.kt$ItemImageAtlas$if</ID>
<ID>BracesOnIfStatements:ModuleAntiExploit.kt$ModuleAntiExploit$if</ID>
<ID>BracesOnIfStatements:ModuleAutoBow.kt$ModuleAutoBow$else</ID>
<ID>BracesOnIfStatements:ModuleAutoBow.kt$ModuleAutoBow$if</ID>
<ID>BracesOnIfStatements:ModuleAutoFarm.kt$ModuleAutoFarm$if</ID>
<ID>BracesOnIfStatements:ModuleBlockESP.kt$ModuleBlockESP.Glow$if</ID>
<ID>BracesOnIfStatements:ModuleBlockESP.kt$ModuleBlockESP.Outline$if</ID>
Expand Down Expand Up @@ -87,7 +85,6 @@
<ID>LongMethod:CommandScript.kt$CommandScript$override fun createCommand(): Command</ID>
<ID>LongMethod:CommandXRay.kt$CommandXRay$override fun createCommand(): Command</ID>
<ID>LongMethod:InteropFunctionRegistry.kt$internal fun registerInteropFunctions(node: Node)</ID>
<ID>LongMethod:LiquidBounce.kt$LiquidBounce.ClientResourceReloader$override fun reload(manager: ResourceManager)</ID>
<ID>LongMethod:ModuleManager.kt$ModuleManager$fun registerInbuilt()</ID>
<ID>LongMethod:RegistryFunctions.kt$@Suppress("UNUSED_PARAMETER") fun getRegistries(requestObject: RequestObject)</ID>
<ID>LongMethod:Value.kt$Value$open fun setByString(string: String)</ID>
Expand All @@ -98,7 +95,6 @@
<ID>LongParameterList:Region.kt$Region$(minX: Int, minY: Int, minZ: Int, maxX: Int, maxY: Int, maxZ: Int)</ID>
<ID>LongParameterList:RotationsUtil.kt$RotationManager$( rotation: Rotation, considerInventory: Boolean = true, configurable: RotationsConfigurable, priority: Priority, provider: ClientModule, whenReached: RestrictedSingleUseAction? = null )</ID>
<ID>LongParameterList:RotationsUtil.kt$RotationManager$( vecRotation: VecRotation, entity: Entity? = null, considerInventory: Boolean = true, configurable: RotationsConfigurable, priority: Priority, provider: ClientModule )</ID>
<ID>LongParameterList:ScriptNetworkUtil.kt$ScriptNetworkUtil$(x: Double, y: Double, z: Double, yaw: Float, pitch: Float, onGround: Boolean)</ID>
<ID>LongParameterList:TargetFinding.kt$BlockPlacementTargetFindingOptions$( val offsetsToInvestigate: List&lt;Vec3i>, val stackToPlaceWith: ItemStack, val facePositionFactory: FaceTargetPositionFactory, val offsetPriorityGetter: (Vec3i) -> Double, val playerPositionOnPlacement: Vec3d, val playerPoseOnPlacement: EntityPose = EntityPose.STANDING, val allowPointingAway: Boolean = false )</ID>
<ID>LongParameterList:ThemeManager.kt$ThemeManager$(context: DrawContext, width: Int, height: Int, mouseX: Int, mouseY: Int, delta: Float)</ID>
<ID>LoopWithTooManyJumpStatements:BlockPlacer.kt$BlockPlacer$while</ID>
Expand All @@ -121,7 +117,6 @@
<ID>PrintStackTrace:CommandManager.kt$CommandManager$e</ID>
<ID>ReturnCount:IntegrationListener.kt$IntegrationListener$private fun handleScreenSituation(screen: Screen?): Boolean</ID>
<ID>ReturnCount:SpeedAntiCornerBump.kt$SpeedAntiCornerBump$fun getSuggestedJumpDelay( simulatedPlayer: SimulatedPlayer, n: Int = 2, ): Int?</ID>
<ID>SpreadOperator:ModuleVomit.kt$ModuleVomit$( *emptySlots.map { slot -> CreativeInventoryAction.performFillSlot(randomStack, slot) } .toTypedArray(), *emptySlots.map { slot -> ClickInventoryAction.performThrow(null, slot) } .toTypedArray() )</ID>
<ID>StringLiteralDuplication:AutoQueueGommeDuels.kt$AutoQueueGommeDuels$"AutoPlay"</ID>
<ID>StringLiteralDuplication:ScriptSetting.kt$ScriptSetting$"default"</ID>
<ID>SwallowedException:ClientInteropServer.kt$ClientInteropServer$e: Exception</ID>
Expand Down Expand Up @@ -152,7 +147,6 @@
<ID>UnusedParameter:ClientApi.kt$ClientApi$settings: String</ID>
<ID>UnusedParameter:CommandConfig.kt$CommandConfig$validator: (ClientModule) -> Boolean = { true }</ID>
<ID>UnusedParameter:CommandLocalConfig.kt$CommandLocalConfig$validator: (ClientModule) -> Boolean = { true }</ID>
<ID>UnusedParameter:FaceTargetPositionFactory.kt$StabilizedRotationTargetPositionFactory$face: Face</ID>
<ID>UnusedParameter:ModuleManager.kt$ModuleManager$args: List&lt;String></ID>
<ID>UnusedPrivateProperty:NoFallBlink.kt$NoFallBlink$i</ID>
</CurrentIssues>
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xms1024m -Xmx4096m
# Fabric Properties
# Check these on https://fabricmc.net/versions.html
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.1
loader_version=0.16.9
min_loader_version=0.16.5

# Fabric API
fabric_version=0.110.0+1.21.1
fabric_version=0.111.0+1.21.4
# Loom
loom_version=1.9-SNAPSHOT
loom_version=1.8-SNAPSHOT
# Mod Properties
mod_version=0.22.1
maven_group=net.ccbluex
archives_base_name=liquidbounce
# Kotlin
# https://kotlinlang.org/releases.html
kotlin_version=2.1.0
kotlin_version=2.0.21
# https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
fabric_kotlin_version=1.13.0+kotlin.2.1.0
fabric_kotlin_version=1.12.3+kotlin.2.0.21
ccetl marked this conversation as resolved.
Show resolved Hide resolved
# mcef
mcef_version=1.3.1-1.21.1
mcef_version=1.3.0-1.21.4
ccetl marked this conversation as resolved.
Show resolved Hide resolved
# mc-authlib
mc_authlib_version=1.4.1
# Recommended mods
mod_menu_version=11.0.3
sodium_version=mc1.21.1-0.6.0-fabric
viafabricplus_version=3.4.9
mod_menu_version=13.0.0-beta.1
sodium_version=mc1.21.4-0.6.3-fabric
viafabricplus_version=3.6.1
18 changes: 18 additions & 0 deletions src/main/java/net/ccbluex/liquidbounce/common/ChunkUpdateFlag.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2024 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.common;

public class ChunkUpdateFlag {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2024 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.common;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.Framebuffer;

import java.util.ArrayList;
import java.util.List;

/**
* Modifies {@link MinecraftClient#getFramebuffer()} to return an own framebuffer so that minecraft writes results
* to that framebuffer and not the main framebuffer.
*
* @author ccetl
*/
public class GlobalFrameBuffer {

public final static List<Framebuffer> stack = new ArrayList<>(2);

private static Framebuffer spoofedFramebuffer;

public static Framebuffer getSpoofedFramebuffer() {
return spoofedFramebuffer;
}

public static void push(Framebuffer spoofedFramebuffer) {
if (GlobalFrameBuffer.spoofedFramebuffer != null) {
stack.addLast(GlobalFrameBuffer.spoofedFramebuffer);
}

GlobalFrameBuffer.spoofedFramebuffer = spoofedFramebuffer;
}

public static void pop() {
if (stack.isEmpty()) {
spoofedFramebuffer = null;
return;
}

spoofedFramebuffer = stack.getLast();
}

public static void clear() {
stack.clear();
spoofedFramebuffer = null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*
*/
package net.ccbluex.liquidbounce.common;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/

package net.ccbluex.liquidbounce.common;

import net.ccbluex.liquidbounce.features.module.modules.exploit.ModuleGhostHand;
Expand Down Expand Up @@ -66,4 +65,5 @@ public static BlockHitResult tweakedRaycast(BlockView blockView, RaycastContext
return BlockHitResult.createMissed(contextx.getEnd(), Direction.getFacing(vec3d.x, vec3d.y, vec3d.z), BlockPos.ofFloored(contextx.getEnd()));
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.net.Proxy;

@Mixin(value = MinecraftClient.class, remap = false)
public class MixinMinecraftClient {
public abstract class MixinMinecraftClient {

@ModifyExpressionValue(method = "createUrlConnection", at = @At(
value = "FIELD",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2024 CCBlueX
*
* LiquidBounce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LiquidBounce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
*/
package net.ccbluex.liquidbounce.injection.mixins.blaze3d;

import com.mojang.blaze3d.systems.RenderSystem;
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleCustomAmbience;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(value = RenderSystem.class, remap = false)
public abstract class MixinRenderSystem {

@Inject(method = "clearColor", at = @At(value = "HEAD"), cancellable = true)
private static void injectFog(float red, float green, float blue, float alpha, CallbackInfo ci) {
if (ModuleCustomAmbience.FogConfigurable.INSTANCE.modifyClearColor()) {
ci.cancel();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleXRay;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(Block.class)
public class MixinBlock {

@ModifyReturnValue(method = "shouldDrawSide", at = @At("RETURN"))
private static boolean injectXRay(boolean original, BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos otherPos) {
private static boolean injectXRay(boolean original, BlockState state, BlockState otherState, Direction side) {
var xRay = ModuleXRay.INSTANCE;
if (xRay.getRunning()) {
return xRay.shouldRender(state, pos);
return xRay.shouldRender(state, otherState, side);
}

return original;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class MixinBlockCollisionSpliterator {
*/
@ModifyExpressionValue(method = "computeNext", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;getCollisionShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;"
target = "Lnet/minecraft/block/ShapeContext;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;"
))
private VoxelShape hookCollisionShape(VoxelShape original, @Local BlockState blockState) {
if (this.pos == null || ShapeFlag.noShapeChange) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static <T, C> T raycast(Vec3d start, Vec3d end, C context, BiFunction<C, BlockPo

/**
* @author superblaubeere27
* @reason .
*/
@Overwrite
default BlockHitResult raycast(RaycastContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ public class MixinGameMode {
private static GameMode setDefaultAsNull(GameMode gameMode) {
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minecraft.client.option.GameOptions;
import net.minecraft.client.option.SimpleOption;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand Down Expand Up @@ -38,4 +37,5 @@ private void injectGuiScale(CallbackInfoReturnable<SimpleOption<Integer>> cir) {
cir.getReturnValue().setValue(2);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,24 @@
import net.ccbluex.liquidbounce.features.module.modules.combat.criticals.ModuleCriticals;
import net.ccbluex.liquidbounce.features.module.modules.movement.ModuleSprint;
import net.minecraft.client.input.Input;
import net.minecraft.util.PlayerInput;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(Input.class)
public class MixinInput {
@Shadow
public boolean pressingRight;
@Shadow
public boolean pressingLeft;
@Shadow
public boolean pressingBack;
@Shadow
public boolean pressingForward;
public abstract class MixinInput {

@Shadow
public float movementForward;

@Shadow
public float movementSideways;
@Shadow
public boolean jumping;

@Shadow public boolean sneaking;
@Shadow
public PlayerInput playerInput;

@Inject(method = "hasForwardMovement", cancellable = true, at = @At("RETURN"))
private void hookOmnidirectionalSprintA(final CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
Expand Down
Loading
Loading