Skip to content

Commit e231efd

Browse files
ccetlDataM0delsuperblaubeere27
authored
feat: Minecraft 1.21.4 (#4980)
* feat: 1.21.4 * merge * fix: detekt * update baseline * progress * fix(MixinItem): consumableComponent can sometimes be null, I guess * chore(MixinItem#hookSwordUse): add braces before detekt and ccetl scream at me * feat: NoSlowBundle * a * refactor: no-slow * fix: blur - the nametags are still not quite right * readd: limitExplosionStrength * feat/fix: -the fakeplayer now regenerates -update libraries -outline esp * fix: FramebufferShader * merge * fix: make the outline esp not look trashy * fix: blend * fix: ItemFramebufferRenderer * rename GlobalFrameBuffer -> GlobalFramebuffer * Fixed problems from review --------- Co-authored-by: DataM0del <[email protected]> Co-authored-by: yaraksan <[email protected]>
1 parent 1cb4e87 commit e231efd

File tree

252 files changed

+2314
-1824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+2314
-1824
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/run/
1010
/mcef/
1111
/logs/
12+
/.kotlin/

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ plugins {
2828
id "org.jetbrains.dokka" version "1.9.10"
2929
}
3030

31-
archivesBaseName = project.archives_base_name
32-
version = project.mod_version
33-
group = project.maven_group
31+
base {
32+
archivesBaseName = project.archives_base_name
33+
version = project.mod_version
34+
group = project.maven_group
35+
}
3436

3537
configurations {
3638
includeDependency

config/detekt/baseline.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
<ID>BracesOnIfStatements:FlyGrim2859V.kt$FlyGrim2859V$if</ID>
1919
<ID>BracesOnIfStatements:ItemImageAtlas.kt$ItemImageAtlas$if</ID>
2020
<ID>BracesOnIfStatements:ModuleAntiExploit.kt$ModuleAntiExploit$if</ID>
21-
<ID>BracesOnIfStatements:ModuleAutoBow.kt$ModuleAutoBow$else</ID>
22-
<ID>BracesOnIfStatements:ModuleAutoBow.kt$ModuleAutoBow$if</ID>
2321
<ID>BracesOnIfStatements:ModuleAutoFarm.kt$ModuleAutoFarm$if</ID>
2422
<ID>BracesOnIfStatements:ModuleBlockESP.kt$ModuleBlockESP.Glow$if</ID>
2523
<ID>BracesOnIfStatements:ModuleBlockESP.kt$ModuleBlockESP.Outline$if</ID>
@@ -87,7 +85,6 @@
8785
<ID>LongMethod:CommandScript.kt$CommandScript$override fun createCommand(): Command</ID>
8886
<ID>LongMethod:CommandXRay.kt$CommandXRay$override fun createCommand(): Command</ID>
8987
<ID>LongMethod:InteropFunctionRegistry.kt$internal fun registerInteropFunctions(node: Node)</ID>
90-
<ID>LongMethod:LiquidBounce.kt$LiquidBounce.ClientResourceReloader$override fun reload(manager: ResourceManager)</ID>
9188
<ID>LongMethod:ModuleManager.kt$ModuleManager$fun registerInbuilt()</ID>
9289
<ID>LongMethod:RegistryFunctions.kt$@Suppress("UNUSED_PARAMETER") fun getRegistries(requestObject: RequestObject)</ID>
9390
<ID>LongMethod:Value.kt$Value$open fun setByString(string: String)</ID>
@@ -98,7 +95,6 @@
9895
<ID>LongParameterList:Region.kt$Region$(minX: Int, minY: Int, minZ: Int, maxX: Int, maxY: Int, maxZ: Int)</ID>
9996
<ID>LongParameterList:RotationsUtil.kt$RotationManager$( rotation: Rotation, considerInventory: Boolean = true, configurable: RotationsConfigurable, priority: Priority, provider: ClientModule, whenReached: RestrictedSingleUseAction? = null )</ID>
10097
<ID>LongParameterList:RotationsUtil.kt$RotationManager$( vecRotation: VecRotation, entity: Entity? = null, considerInventory: Boolean = true, configurable: RotationsConfigurable, priority: Priority, provider: ClientModule )</ID>
101-
<ID>LongParameterList:ScriptNetworkUtil.kt$ScriptNetworkUtil$(x: Double, y: Double, z: Double, yaw: Float, pitch: Float, onGround: Boolean)</ID>
10298
<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>
10399
<ID>LongParameterList:ThemeManager.kt$ThemeManager$(context: DrawContext, width: Int, height: Int, mouseX: Int, mouseY: Int, delta: Float)</ID>
104100
<ID>LoopWithTooManyJumpStatements:BlockPlacer.kt$BlockPlacer$while</ID>
@@ -121,7 +117,6 @@
121117
<ID>PrintStackTrace:CommandManager.kt$CommandManager$e</ID>
122118
<ID>ReturnCount:IntegrationListener.kt$IntegrationListener$private fun handleScreenSituation(screen: Screen?): Boolean</ID>
123119
<ID>ReturnCount:SpeedAntiCornerBump.kt$SpeedAntiCornerBump$fun getSuggestedJumpDelay( simulatedPlayer: SimulatedPlayer, n: Int = 2, ): Int?</ID>
124-
<ID>SpreadOperator:ModuleVomit.kt$ModuleVomit$( *emptySlots.map { slot -> CreativeInventoryAction.performFillSlot(randomStack, slot) } .toTypedArray(), *emptySlots.map { slot -> ClickInventoryAction.performThrow(null, slot) } .toTypedArray() )</ID>
125120
<ID>StringLiteralDuplication:AutoQueueGommeDuels.kt$AutoQueueGommeDuels$"AutoPlay"</ID>
126121
<ID>StringLiteralDuplication:ScriptSetting.kt$ScriptSetting$"default"</ID>
127122
<ID>SwallowedException:ClientInteropServer.kt$ClientInteropServer$e: Exception</ID>
@@ -152,7 +147,6 @@
152147
<ID>UnusedParameter:ClientApi.kt$ClientApi$settings: String</ID>
153148
<ID>UnusedParameter:CommandConfig.kt$CommandConfig$validator: (ClientModule) -> Boolean = { true }</ID>
154149
<ID>UnusedParameter:CommandLocalConfig.kt$CommandLocalConfig$validator: (ClientModule) -> Boolean = { true }</ID>
155-
<ID>UnusedParameter:FaceTargetPositionFactory.kt$StabilizedRotationTargetPositionFactory$face: Face</ID>
156150
<ID>UnusedParameter:ModuleManager.kt$ModuleManager$args: List&lt;String></ID>
157151
<ID>UnusedPrivateProperty:NoFallBlink.kt$NoFallBlink$i</ID>
158152
</CurrentIssues>

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ kotlin.code.style=official
2020
org.gradle.jvmargs=-Xms1024m -Xmx4096m
2121
# Fabric Properties
2222
# Check these on https://fabricmc.net/versions.html
23-
minecraft_version=1.21.1
24-
yarn_mappings=1.21.1+build.3
23+
minecraft_version=1.21.4
24+
yarn_mappings=1.21.4+build.1
2525
loader_version=0.16.9
2626
min_loader_version=0.16.5
2727

2828
# Fabric API
29-
fabric_version=0.110.0+1.21.1
29+
fabric_version=0.111.0+1.21.4
3030
# Loom
3131
loom_version=1.9-SNAPSHOT
3232
# Mod Properties
@@ -39,10 +39,10 @@ kotlin_version=2.1.0
3939
# https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
4040
fabric_kotlin_version=1.13.0+kotlin.2.1.0
4141
# mcef
42-
mcef_version=1.3.1-1.21.1
42+
mcef_version=1.3.0-1.21.4
4343
# mc-authlib
4444
mc_authlib_version=1.4.1
4545
# Recommended mods
46-
mod_menu_version=11.0.3
47-
sodium_version=mc1.21.1-0.6.0-fabric
48-
viafabricplus_version=3.4.9
46+
mod_menu_version=13.0.0-beta.1
47+
sodium_version=mc1.21.4-0.6.5-fabric
48+
viafabricplus_version=3.6.1

src/main/java/net/ccbluex/liquidbounce/common/ChunkUpdateFlag.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3+
*
4+
* Copyright (c) 2015 - 2024 CCBlueX
5+
*
6+
* LiquidBounce is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* LiquidBounce is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
package net.ccbluex.liquidbounce.common;
220

321
public class ChunkUpdateFlag {
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3+
*
4+
* Copyright (c) 2015 - 2024 CCBlueX
5+
*
6+
* LiquidBounce is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* LiquidBounce is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
package net.ccbluex.liquidbounce.common;
20+
21+
import net.minecraft.client.MinecraftClient;
22+
import net.minecraft.client.gl.Framebuffer;
23+
24+
import java.util.ArrayList;
25+
import java.util.List;
26+
27+
/**
28+
* Modifies {@link MinecraftClient#getFramebuffer()} to return an own framebuffer so that minecraft writes results
29+
* to that framebuffer and not the main framebuffer.
30+
*
31+
* @author ccetl
32+
*/
33+
public class GlobalFramebuffer {
34+
35+
public final static List<Framebuffer> stack = new ArrayList<>(2);
36+
37+
private static Framebuffer spoofedFramebuffer;
38+
39+
public static Framebuffer getSpoofedFramebuffer() {
40+
return spoofedFramebuffer;
41+
}
42+
43+
public static void push(Framebuffer spoofedFramebuffer) {
44+
if (GlobalFramebuffer.spoofedFramebuffer != null) {
45+
stack.addLast(GlobalFramebuffer.spoofedFramebuffer);
46+
}
47+
48+
GlobalFramebuffer.spoofedFramebuffer = spoofedFramebuffer;
49+
}
50+
51+
public static void pop() {
52+
if (stack.isEmpty()) {
53+
spoofedFramebuffer = null;
54+
return;
55+
}
56+
57+
spoofedFramebuffer = stack.getLast();
58+
}
59+
60+
public static void clear() {
61+
stack.clear();
62+
spoofedFramebuffer = null;
63+
}
64+
65+
}

src/main/java/net/ccbluex/liquidbounce/common/OutlineFlag.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*
1616
* You should have received a copy of the GNU General Public License
1717
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18-
*
1918
*/
2019
package net.ccbluex.liquidbounce.common;
2120

src/main/java/net/ccbluex/liquidbounce/common/TweakedMethods.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* You should have received a copy of the GNU General Public License
1717
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
1818
*/
19-
2019
package net.ccbluex.liquidbounce.common;
2120

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

src/main/java/net/ccbluex/liquidbounce/injection/mixins/authlib/MixinMinecraftClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import java.net.Proxy;
3232

3333
@Mixin(value = MinecraftClient.class, remap = false)
34-
public class MixinMinecraftClient {
34+
public abstract class MixinMinecraftClient {
3535

3636
@ModifyExpressionValue(method = "createUrlConnection", at = @At(
3737
value = "FIELD",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3+
*
4+
* Copyright (c) 2015 - 2024 CCBlueX
5+
*
6+
* LiquidBounce is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* LiquidBounce is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
package net.ccbluex.liquidbounce.injection.mixins.blaze3d;
20+
21+
import com.mojang.blaze3d.systems.RenderSystem;
22+
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleCustomAmbience;
23+
import org.spongepowered.asm.mixin.Mixin;
24+
import org.spongepowered.asm.mixin.injection.At;
25+
import org.spongepowered.asm.mixin.injection.Inject;
26+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
27+
28+
@Mixin(value = RenderSystem.class, remap = false)
29+
public abstract class MixinRenderSystem {
30+
31+
@Inject(method = "clearColor", at = @At(value = "HEAD"), cancellable = true)
32+
private static void injectFog(float red, float green, float blue, float alpha, CallbackInfo ci) {
33+
if (ModuleCustomAmbience.FogConfigurable.INSTANCE.modifyClearColor()) {
34+
ci.cancel();
35+
}
36+
}
37+
38+
}

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/block/MixinBlock.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,18 @@
2525
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleXRay;
2626
import net.minecraft.block.Block;
2727
import net.minecraft.block.BlockState;
28-
import net.minecraft.util.math.BlockPos;
2928
import net.minecraft.util.math.Direction;
30-
import net.minecraft.world.BlockView;
3129
import org.spongepowered.asm.mixin.Mixin;
3230
import org.spongepowered.asm.mixin.injection.At;
3331

3432
@Mixin(Block.class)
3533
public class MixinBlock {
3634

3735
@ModifyReturnValue(method = "shouldDrawSide", at = @At("RETURN"))
38-
private static boolean injectXRay(boolean original, BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos otherPos) {
36+
private static boolean injectXRay(boolean original, BlockState state, BlockState otherState, Direction side) {
3937
var xRay = ModuleXRay.INSTANCE;
4038
if (xRay.getRunning()) {
41-
return xRay.shouldRender(state, pos);
39+
return xRay.shouldRender(state, otherState, side);
4240
}
4341

4442
return original;

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/block/MixinBlockCollisionSpliterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class MixinBlockCollisionSpliterator {
4747
*/
4848
@ModifyExpressionValue(method = "computeNext", at = @At(
4949
value = "INVOKE",
50-
target = "Lnet/minecraft/block/BlockState;getCollisionShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;"
50+
target = "Lnet/minecraft/block/ShapeContext;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;"
5151
))
5252
private VoxelShape hookCollisionShape(VoxelShape original, @Local BlockState blockState) {
5353
if (this.pos == null || ShapeFlag.noShapeChange) {

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/block/MixinBlockView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static <T, C> T raycast(Vec3d start, Vec3d end, C context, BiFunction<C, BlockPo
4646

4747
/**
4848
* @author superblaubeere27
49+
* @reason .
4950
*/
5051
@Overwrite
5152
default BlockHitResult raycast(RaycastContext context) {

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/client/MixinGameMode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ public class MixinGameMode {
3939
private static GameMode setDefaultAsNull(GameMode gameMode) {
4040
return null;
4141
}
42+
4243
}

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/client/MixinGameOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import net.minecraft.client.option.GameOptions;
66
import net.minecraft.client.option.SimpleOption;
77
import org.spongepowered.asm.mixin.Mixin;
8-
import org.spongepowered.asm.mixin.Overwrite;
98
import org.spongepowered.asm.mixin.injection.At;
109
import org.spongepowered.asm.mixin.injection.Inject;
1110
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -38,4 +37,5 @@ private void injectGuiScale(CallbackInfoReturnable<SimpleOption<Integer>> cir) {
3837
cir.getReturnValue().setValue(2);
3938
}
4039
}
40+
4141
}

src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/client/MixinInput.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,24 @@
2222
import net.ccbluex.liquidbounce.features.module.modules.combat.criticals.ModuleCriticals;
2323
import net.ccbluex.liquidbounce.features.module.modules.movement.ModuleSprint;
2424
import net.minecraft.client.input.Input;
25+
import net.minecraft.util.PlayerInput;
2526
import org.spongepowered.asm.mixin.Mixin;
2627
import org.spongepowered.asm.mixin.Shadow;
2728
import org.spongepowered.asm.mixin.injection.At;
2829
import org.spongepowered.asm.mixin.injection.Inject;
2930
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
3031

3132
@Mixin(Input.class)
32-
public class MixinInput {
33-
@Shadow
34-
public boolean pressingRight;
35-
@Shadow
36-
public boolean pressingLeft;
37-
@Shadow
38-
public boolean pressingBack;
39-
@Shadow
40-
public boolean pressingForward;
33+
public abstract class MixinInput {
34+
4135
@Shadow
4236
public float movementForward;
37+
4338
@Shadow
4439
public float movementSideways;
45-
@Shadow
46-
public boolean jumping;
4740

48-
@Shadow public boolean sneaking;
41+
@Shadow
42+
public PlayerInput playerInput;
4943

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

0 commit comments

Comments
 (0)