Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
d741049
MC version
MukjepScarlet Sep 5, 2025
ee1f475
fix progress x1
MukjepScarlet Sep 5, 2025
638ecdb
fix progress x2
MukjepScarlet Sep 5, 2025
4f2b5aa
SwordItem and PickaxeItem are removed
MukjepScarlet Sep 5, 2025
f3bcf3b
GlStateManager moved
MukjepScarlet Sep 5, 2025
83cee97
getTickDelta renamed
MukjepScarlet Sep 5, 2025
d02b991
fixing...
MukjepScarlet Sep 5, 2025
5757b11
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 9, 2025
e0d7d92
conflict
MukjepScarlet Sep 9, 2025
615ee33
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 9, 2025
e2a4e5c
access widener temp fix
MukjepScarlet Sep 9, 2025
6cb5e02
rename: LimbAnimator.pos -> animationProgress
MukjepScarlet Sep 9, 2025
f44dd23
ext: isInsideWaterOrBubbleColumn
MukjepScarlet Sep 9, 2025
9e2374f
fixing...
MukjepScarlet Sep 9, 2025
bebfa14
fixing...
MukjepScarlet Sep 9, 2025
3600b3b
fixing...
MukjepScarlet Sep 9, 2025
5db87fe
fixing...
MukjepScarlet Sep 9, 2025
4d600bc
dependency versions
MukjepScarlet Sep 9, 2025
cb24565
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 10, 2025
075fc7b
shield item
MukjepScarlet Sep 10, 2025
40eae11
merge conflict
MukjepScarlet Sep 10, 2025
a66dd6c
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 11, 2025
35e92d2
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 13, 2025
9d598dd
fix ItemStackHash
MukjepScarlet Sep 14, 2025
096e8f4
defaultBlendFunc
MukjepScarlet Sep 14, 2025
754c1a3
blabla
MukjepScarlet Sep 14, 2025
1a0a068
fix some mixins
MukjepScarlet Sep 15, 2025
e44260b
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 15, 2025
df47338
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 18, 2025
63ed99c
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 21, 2025
a9350ec
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 23, 2025
ffd1cae
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 23, 2025
8be4fda
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 25, 2025
da4aa09
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 26, 2025
7f149aa
port
MukjepScarlet Sep 26, 2025
045e850
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 27, 2025
3ce537c
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 28, 2025
742ef5c
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Sep 29, 2025
bf17788
random stuffs
MukjepScarlet Sep 29, 2025
316342c
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Sep 29, 2025
bad88f1
imports
MukjepScarlet Sep 29, 2025
29b2dfe
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 1, 2025
5471f5c
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Oct 3, 2025
1a4b99b
remove redundant render env
MukjepScarlet Oct 3, 2025
7b09d24
Revert "port"
MukjepScarlet Oct 4, 2025
4af0127
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 4, 2025
de057d5
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 5, 2025
8e314d1
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 5, 2025
980f58a
mixin progress
MukjepScarlet Oct 6, 2025
51064a0
mixin progress 1
MukjepScarlet Oct 6, 2025
05c8380
mixin progress 2: player input addition
MukjepScarlet Oct 6, 2025
86a5001
mixin progress 3
MukjepScarlet Oct 6, 2025
2ff375a
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 8, 2025
ae1fe63
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 11, 2025
ce548ee
remove ShaderProgramKey in VertexInputType
MukjepScarlet Oct 11, 2025
d5227d6
update polyglot to 25.0.0
MukjepScarlet Oct 11, 2025
a347c07
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 12, 2025
c70c30a
glClearColor
MukjepScarlet Oct 12, 2025
cb437a1
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 12, 2025
66553e2
GlStateManager package
MukjepScarlet Oct 12, 2025
3a23442
VertexInputType drop ShaderProgramKey
MukjepScarlet Oct 12, 2025
0e8b75c
Minimap GpuTexture
MukjepScarlet Oct 12, 2025
70ee3ca
Framebuffer.toNativeImage
MukjepScarlet Oct 12, 2025
f3a4acd
useless & replacement
MukjepScarlet Oct 12, 2025
838cdc9
what am I doing
MukjepScarlet Oct 12, 2025
8ab263f
CustomAmbience fix (hopefully works)
MukjepScarlet Oct 12, 2025
d482d0f
FontRenderer & ItemAtlas: SimpleFrameBuffer -> GpuTexture
MukjepScarlet Oct 12, 2025
e3acaef
mcef local update
MukjepScarlet Oct 12, 2025
4980b45
identifier cleanup
MukjepScarlet Oct 12, 2025
00f208a
saddle
MukjepScarlet Oct 12, 2025
ef63558
client player
MukjepScarlet Oct 12, 2025
2e3e877
custom ambience not 100% correct
MukjepScarlet Oct 13, 2025
78e4c3e
Gradle 9.1.0, detekt 1.23.8
MukjepScarlet Oct 13, 2025
95e99e4
Small refactors
MukjepScarlet Oct 14, 2025
dd8ed46
FontRenderer refactor
MukjepScarlet Oct 14, 2025
f96a2ca
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Oct 16, 2025
474c405
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Oct 16, 2025
944f5d5
remove pipeline in env
MukjepScarlet Oct 16, 2025
fb118c8
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 16, 2025
82ea9ee
shader program stuffs
MukjepScarlet Oct 16, 2025
ad2bcb1
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 17, 2025
0d8663a
records
MukjepScarlet Oct 17, 2025
75015ce
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 18, 2025
421e1a2
fix PlayerInventory SilentHotbar mixin
MukjepScarlet Oct 18, 2025
11e0e24
some fixes
MukjepScarlet Oct 18, 2025
40a92f3
?
MukjepScarlet Oct 18, 2025
1cdc312
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 21, 2025
ec1fdc2
render: pipeline in RenderLayerExtensions
MukjepScarlet Oct 21, 2025
6631909
RenderLayerExtensions rewrite without shader program
MukjepScarlet Oct 21, 2025
3abc23b
move pipelines to kotlin
MukjepScarlet Oct 21, 2025
78908e2
RenderPhase.ShaderProgram -> RenderPipeline.Snippet
MukjepScarlet Oct 21, 2025
e27a829
prepare rewriting custom shader program
MukjepScarlet Oct 21, 2025
9cb5eb8
BgraShader?
MukjepScarlet Oct 21, 2025
01c7d04
.
MukjepScarlet Oct 21, 2025
64f3529
feat(1.21.5): port the shader system (#7142)
ccetl Oct 22, 2025
b430939
Random stuffs
MukjepScarlet Oct 22, 2025
eefa274
fixes
MukjepScarlet Oct 22, 2025
eecec12
unfixed mcef issue
MukjepScarlet Oct 22, 2025
870d503
primitives
MukjepScarlet Oct 22, 2025
3552c61
some other changes
MukjepScarlet Oct 22, 2025
72c79c6
exclude shadowed libs of viaversion in autocompletion
MukjepScarlet Oct 22, 2025
19f91bf
Fixed cef browser texture updates
superblaubeere27 Oct 22, 2025
9fdf169
Fix stack overflow exception
superblaubeere27 Oct 22, 2025
1cbdb75
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 22, 2025
5db5733
Fixed CefBrowser returning a texture before being ready
superblaubeere27 Oct 22, 2025
925b3d7
skip actual draw
MukjepScarlet Oct 22, 2025
ea2af36
skip ItemImageAtlas
MukjepScarlet Oct 23, 2025
4ed49c8
random code
MukjepScarlet Oct 23, 2025
a4ac70d
BuiltBuffer.draw pipeline completion
MukjepScarlet Oct 23, 2025
763ea25
pipelines
MukjepScarlet Oct 23, 2025
5d51214
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Oct 23, 2025
d4e6c15
name format
MukjepScarlet Oct 23, 2025
095bad2
pipeline migrations
MukjepScarlet Oct 23, 2025
8eaaa91
remove duplicated functions
MukjepScarlet Oct 23, 2025
8c90549
misc
MukjepScarlet Oct 23, 2025
01fe972
migrate gl calls into pipelines
MukjepScarlet Oct 23, 2025
d42655a
split jcef pipelines
MukjepScarlet Oct 23, 2025
1ce37d0
2d and 3d render modules working now. including fonts
MukjepScarlet Oct 24, 2025
730e693
Migrate theme shader to MC pipeline
MukjepScarlet Oct 24, 2025
e57e50f
detekt
MukjepScarlet Oct 24, 2025
e7ff901
ItemImageAtlas no crash now
MukjepScarlet Oct 24, 2025
37cb649
some fixes
MukjepScarlet Oct 24, 2025
ada95d9
withScissor dsl
MukjepScarlet Oct 24, 2025
53fd79e
show js loading duration
MukjepScarlet Oct 24, 2025
d1f205f
ItemImageAtlas done
MukjepScarlet Oct 24, 2025
1479dff
HUD blur still broken
MukjepScarlet Oct 24, 2025
4c48513
shader cleanup
MukjepScarlet Oct 24, 2025
bc50997
Added more debug info to GL errors (now it shows the file and line nu…
superblaubeere27 Oct 24, 2025
3d77625
Fixed OpenGL error spam after resize
superblaubeere27 Oct 24, 2025
3ffecf7
Fixed flickering light after resize
superblaubeere27 Oct 24, 2025
e7689e8
Fix minimap texture filtering
superblaubeere27 Oct 24, 2025
c4b504c
render comments
MukjepScarlet Oct 25, 2025
23c5449
Revert "withScissor dsl" (removed in 1.21.6)
MukjepScarlet Oct 25, 2025
fa826bc
small fix + improvement
MukjepScarlet Oct 25, 2025
bf9b62f
fix AntiBlind nausea
MukjepScarlet Oct 25, 2025
ba6bb13
1
MukjepScarlet Oct 25, 2025
6946c1d
more exclusion
MukjepScarlet Oct 25, 2025
b19e8fa
fix ItemChams
MukjepScarlet Oct 25, 2025
7612143
fix ItemChams
MukjepScarlet Oct 25, 2025
ec21518
temp
MukjepScarlet Oct 25, 2025
4e279ee
Fix gl debug location info
superblaubeere27 Oct 25, 2025
5164710
stop using mipmaps for minimaps
superblaubeere27 Oct 25, 2025
b799682
fix a small bug
MukjepScarlet Oct 25, 2025
e59239e
fix and improve ui blur
superblaubeere27 Oct 25, 2025
69e25b4
inlined old aliases, update version
MukjepScarlet Oct 25, 2025
23265b0
detekt & other tiny improvements & removal
MukjepScarlet Oct 25, 2025
05139e9
copyright headers
MukjepScarlet Oct 25, 2025
e1ee43d
fixed dynamic glypyh page uploading
superblaubeere27 Oct 25, 2025
8cfb43a
normalize glyph identifier
MukjepScarlet Oct 25, 2025
9fd99d9
add blur easing
superblaubeere27 Oct 25, 2025
1eead50
simplify
MukjepScarlet Oct 25, 2025
47631e6
drop blend of NametagRenderer for new overlay shader
MukjepScarlet Oct 25, 2025
c00c305
simplify id
MukjepScarlet Oct 25, 2025
b632d29
clean redundant actions and code style
MukjepScarlet Oct 26, 2025
4cd1d8e
customizable minimap
MukjepScarlet Oct 26, 2025
ea3d5a9
fix minimap upload texture issue
MukjepScarlet Oct 26, 2025
6cf679b
renames
MukjepScarlet Oct 26, 2025
2c60c5b
shortcut for draw single line
MukjepScarlet Oct 26, 2025
00fc45f
new drawQuad shortcut, like drawBox
MukjepScarlet Oct 26, 2025
a151419
Optimize RenderPass init
MukjepScarlet Oct 26, 2025
73ad981
Reuse MatrixStack
MukjepScarlet Oct 26, 2025
cc146de
fix CustomAmbience Custom Light Color
MukjepScarlet Oct 26, 2025
b2716af
fix outline pipeline
MukjepScarlet Oct 26, 2025
cca0f7d
fix ItemESP outline crash
MukjepScarlet Oct 26, 2025
a5196a6
fix CustomAmbience Fog bg color
MukjepScarlet Oct 26, 2025
67462a4
fix blend/blit.frag input uniform name
MukjepScarlet Oct 27, 2025
973b18c
only world render env can use relative to camera
MukjepScarlet Oct 27, 2025
47abc8a
temp
MukjepScarlet Oct 27, 2025
28ea57b
drop old code for SwordBlock
MukjepScarlet Oct 27, 2025
a309e52
Sprint collision check
MukjepScarlet Oct 27, 2025
a50553b
sprint... (incorrect!)
MukjepScarlet Oct 27, 2025
a36ade3
fix draw quad outline with line_strip mode for batch issue
MukjepScarlet Oct 27, 2025
5316296
hitbox
MukjepScarlet Oct 27, 2025
76775bb
fix wrong color
superblaubeere27 Oct 28, 2025
c1fdaf9
drop old 1.7 block animation code
MukjepScarlet Oct 28, 2025
f6b6299
allow to set framebuffer textures
MukjepScarlet Oct 28, 2025
dd08dc9
resource with prefix shortcuts
MukjepScarlet Oct 28, 2025
8860e8a
drop useless registration
MukjepScarlet Oct 28, 2025
5c622d0
cleanup
MukjepScarlet Oct 28, 2025
e4088e6
fix custom framebuffer incorrect depth clear
MukjepScarlet Oct 27, 2025
7037b76
Merge branch 'nextgen' into 1.21.5
MukjepScarlet Oct 28, 2025
297d377
resize event. some shortcuts
MukjepScarlet Oct 28, 2025
aff2b5a
sprint fixed.
MukjepScarlet Oct 28, 2025
46d64d8
fix sword block double transformed on 1.21.5+ protocol
MukjepScarlet Oct 28, 2025
a1eda7d
Add old swords in client item group
MukjepScarlet Oct 28, 2025
91cc62c
code changes
MukjepScarlet Oct 29, 2025
65607d3
revert
MukjepScarlet Oct 30, 2025
5cd038a
adapt 1.21.5 new eggs (cold & warm chicken)
MukjepScarlet Oct 30, 2025
4be57ec
aw
MukjepScarlet Oct 30, 2025
a292713
add Text
MukjepScarlet Oct 30, 2025
f7fcffd
fix swordBlock double animated
MukjepScarlet Oct 30, 2025
e906aaf
fix Nametag apply self item cooldown to other players
MukjepScarlet Oct 30, 2025
af21316
fix SwordBlock self blocking with offhand shield
MukjepScarlet Oct 30, 2025
2d02abe
1
MukjepScarlet Oct 30, 2025
0b2a7cc
fix SwordBlock in MixinItem should ignore vanilla blocking
MukjepScarlet Oct 31, 2025
539fc05
already synchronized
MukjepScarlet Oct 31, 2025
7bfe7dd
batch texture render: step 1
MukjepScarlet Oct 31, 2025
b81c82a
batch texture render: step 2
MukjepScarlet Oct 31, 2025
614481d
batch texture render: step 3
MukjepScarlet Oct 31, 2025
99387f5
batch texture render: step 4
MukjepScarlet Oct 31, 2025
9378729
batch texture render: step 5
MukjepScarlet Oct 31, 2025
7b4e053
detekt cleanup
MukjepScarlet Oct 31, 2025
48bdc69
general improvements
MukjepScarlet Nov 1, 2025
11276af
asText -> asPlainText
MukjepScarlet Nov 1, 2025
4fbc3c1
text 2
MukjepScarlet Nov 1, 2025
be27b49
fix?
MukjepScarlet Nov 1, 2025
d327e86
Merge branch 'refs/heads/nextgen' into 1.21.5
MukjepScarlet Nov 3, 2025
a3de6da
ItemStackComparators merging & cleanup
MukjepScarlet Nov 3, 2025
6311f73
Slots immutable list
MukjepScarlet Nov 3, 2025
2065509
rename
MukjepScarlet Nov 3, 2025
f1c4b24
Revert "Slots immutable list"
MukjepScarlet Nov 3, 2025
5f8ab1c
ext
MukjepScarlet Nov 3, 2025
ac7e17e
compileJava error
MukjepScarlet Nov 4, 2025
eaf5734
some fixes
MukjepScarlet Nov 4, 2025
f4f7652
Remove ItemESP & ESP outline mode. Fix Glow mode for all ESP. Fix out…
MukjepScarlet Nov 4, 2025
ada9856
cleanup
MukjepScarlet Nov 4, 2025
094bdb4
update Fabric
MukjepScarlet Nov 4, 2025
1240b20
1
MukjepScarlet Nov 4, 2025
3e8944b
fix scoreboard text no color
MukjepScarlet Nov 4, 2025
8f6986c
optimize color & text stuffs
MukjepScarlet Nov 5, 2025
2895e73
reorganize extensions
MukjepScarlet Nov 5, 2025
051aa81
async GpuTexture.saveToFile
MukjepScarlet Nov 5, 2025
bb2d304
remove same functions
MukjepScarlet Nov 5, 2025
c2fed12
MathHelper.clamp
MukjepScarlet Nov 5, 2025
f64076a
more exclusions
MukjepScarlet Nov 5, 2025
f403aab
small comment completion
MukjepScarlet Nov 5, 2025
720bb1d
ClientCommandC2SPacket for sneaking migration (for 1.21.6)
MukjepScarlet Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ end_of_line = lf
charset = utf-8
insert_final_newline = true

[*.java]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{kt,kts}]
indent_style = space
indent_size = 4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/*
!.idea/copyright/
!.idea/codeInsightSettings.xml
*.iml
*.ipr
*.iws
Expand Down
11 changes: 11 additions & 0 deletions .idea/codeInsightSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ plugins {
id("fabric-loom")
kotlin("jvm")
id("com.gorylenko.gradle-git-properties") version "2.5.3"
id("io.gitlab.arturbosch.detekt") version "1.23.6"
id("io.gitlab.arturbosch.detekt") version "1.23.8"
id("com.github.node-gradle.node") version "7.1.0"
id("org.jetbrains.dokka") version "2.1.0"
}
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,13 @@ fun Task.getContributors(repoOwner: String, repoName: String): List<String> = tr
* - Mod dependencies
*/
fun Configuration.excludeProvidedLibs() = apply {
// fabric-language-kotlin
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-reflect")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-io-core")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-io-bytestring")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-serialization-core")

exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "net.java.dev.jna", module = "jna")
Expand All @@ -144,5 +149,7 @@ fun Configuration.excludeProvidedLibs() = apply {
exclude(group = "io.netty", module = "netty-handler")
exclude(group = "io.netty", module = "netty-resolver")
exclude(group = "io.netty", module = "netty-transport")
exclude(group = "io.netty", module = "netty-transport-classes-epoll")
exclude(group = "io.netty", module = "netty-transport-native-epoll")
exclude(group = "io.netty", module = "netty-transport-native-unix-common")
}
15 changes: 15 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ exceptions:
style:
# UnusedImports:
# active: true
DestructuringDeclarationWithTooManyEntries:
maxDestructuringEntries: 4
MagicNumber:
active: false
ReturnCount:
Expand All @@ -62,6 +64,19 @@ style:
allowedNames: '_|ignored|expected|serialVersionUID|.+Handler\d*|repeatable'
ForbiddenMethodCall:
active: true
methods:
- 'kotlin.io.print'
- 'kotlin.io.println'
- 'java.math.BigDecimal.<init>(kotlin.Double)'
- 'java.math.BigDecimal.<init>(kotlin.String)'
- 'kotlin.system.measureTimeMillis'
# glBindTexture: replace with GlStateManager._bindTexture(), because everything else will mess up the internal state handling.
- 'org.lwjgl.opengl.GL11.glBindTexture'
# Java stuffs
- 'java.util.Vector.<init>()'
- 'java.util.Stack.<init>()'
- 'java.util.LinkedList.<init>()'
- 'java.util.Hashtable.<init>()'
BracesOnIfStatements:
active: true
singleLine: 'never'
Expand Down
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers

# Fabric Properties
# Check these on https://fabricmc.net/versions.html
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.17.2
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
loader_version=0.17.3
min_loader_version=0.16.14

# Fabric API
fabric_version=0.119.4+1.21.4
fabric_version=0.128.2+1.21.5
# Loom
loom_version=1.11-SNAPSHOT
loom_version=1.12-SNAPSHOT
# Mod Properties
mod_version=0.34.1
maven_group=net.ccbluex
Expand All @@ -55,20 +55,20 @@ kotlinx_coroutines_version=1.10.2
# https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
fabric_kotlin_version=1.13.5+kotlin.2.2.10
# mcef
mcef_version=3.1.2-1.21.4
mcef_version=dev~1.21.5-test-SNAPSHOT
# mc-authlib
mc_authlib_version=1.4.1
# Polyglot
polyglot_version=24.2.1
polyglot_version=25.0.0
# djl
djl_version=0.34.0
# https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
okhttp_version=5.1.0
# Netty, should be sync with game version
# https://mvnrepository.com/artifact/io.netty/netty-all
netty_version=4.1.115.Final
netty_version=4.1.118.Final
# Recommended mods
mod_menu_version=13.0.3
sodium_version=mc1.21.4-0.6.13-fabric
lithium_version=mc1.21.4-0.15.3-fabric
viafabricplus_version=4.0.5-BACKPORT
mod_menu_version=14.0.0-rc.2
sodium_version=mc1.21.5-0.6.13-fabric
lithium_version=mc1.21.5-0.16.3-fabric
viafabricplus_version=4.1.5
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
* Should be drawn using [CustomRenderPhase::getTextureBilinear] to make it look smoother.
*/
@Environment(EnvType.CLIENT)
public class ClientLogoTexture extends ReloadableTexture {
public final class ClientLogoTexture extends ReloadableTexture {

public static final Identifier CLIENT_LOGO = Identifier.of("liquidbounce", "logo");
public static final Identifier CLIENT_LOGO = LiquidBounce.identifier("logo");
public static final int WIDTH = 1920;
public static final int HEIGHT = 721;

Expand Down
108 changes: 90 additions & 18 deletions src/main/java/net/ccbluex/liquidbounce/common/GlobalFramebuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
*/
package net.ccbluex.liquidbounce.common;

import com.mojang.blaze3d.opengl.GlConst;
import com.mojang.blaze3d.opengl.GlStateManager;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.ccbluex.liquidbounce.render.buffer.AbstractFramebuffer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.Framebuffer;

import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL30;

/**
* Modifies {@link MinecraftClient#getFramebuffer()} to return an own framebuffer so that minecraft writes results
Expand All @@ -34,34 +36,104 @@ public final class GlobalFramebuffer {

private GlobalFramebuffer() {}

private static final List<Framebuffer> stack = new ArrayList<>(2);
private static final IntArrayList readStack = new IntArrayList(2);
private static final IntArrayList writeStack = new IntArrayList(2);
private static final ObjectArrayList<AbstractFramebuffer> stack = new ObjectArrayList<>(1);

static {
readStack.add(0);
writeStack.add(0);
}

private static boolean lock;
private static boolean minecraftChangesRead;
private static boolean minecraftChangesWrite;

// framebuffers minecraft sets
public static void updateRead(int id) {
if (!minecraftChangesRead || id == readStack.getInt(0)) {
readStack.set(0, id);
minecraftChangesRead = false;
}

if (!lock || minecraftChangesRead) {
bindRead(id);
}
}

public static void updateWrite(int id) {
if (!minecraftChangesWrite || id == writeStack.getInt(0)) {
writeStack.set(0, id);
minecraftChangesWrite = false;
}

if (!lock || minecraftChangesWrite) {
bindWrite(id);
}
}

private static Framebuffer spoofedFramebuffer;
// when mc changes stuff at the framebuffer, they need to cache the current fbo
public static int getRead() {
minecraftChangesRead = true;
return readStack.getInt(0);
}

public static Framebuffer getSpoofedFramebuffer() {
return spoofedFramebuffer;
public static int getWrite() {
minecraftChangesWrite = true;
return writeStack.getInt(0);
}

public static void push(Framebuffer spoofedFramebuffer) {
if (GlobalFramebuffer.spoofedFramebuffer != null) {
stack.addLast(GlobalFramebuffer.spoofedFramebuffer);
public static void push(AbstractFramebuffer spoofedFramebuffer) {
if (!stack.isEmpty() && stack.top() == spoofedFramebuffer) {
return;
}

GlobalFramebuffer.spoofedFramebuffer = spoofedFramebuffer;
stack.push(spoofedFramebuffer);
readStack.push(spoofedFramebuffer.getId());
writeStack.push(spoofedFramebuffer.getId());
lock = true;

if (!minecraftChangesRead) {
bindRead(spoofedFramebuffer.getId());
}

if (!minecraftChangesWrite) {
bindWrite(spoofedFramebuffer.getId());
}
}

public static void pop() {
if (!readStack.isEmpty()) {
readStack.popInt();
if (!minecraftChangesRead) {
bindRead(readStack.topInt());
}
}

if (!writeStack.isEmpty()) {
writeStack.popInt();
if (!minecraftChangesWrite) {
bindWrite(writeStack.topInt());
}
}

if (!stack.isEmpty()) {
stack.pop();
}

if (stack.isEmpty()) {
spoofedFramebuffer = null;
return;
lock = false;
}
}

spoofedFramebuffer = stack.getLast();
private static void bindRead(int id) {
GlStateManager.readFbo = id;
GL30.glBindFramebuffer(GlConst.GL_READ_FRAMEBUFFER, id);
}

public static void clear() {
stack.clear();
spoofedFramebuffer = null;
private static void bindWrite(int id) {
GlStateManager.writeFbo = id;
GL30.glBindFramebuffer(GlConst.GL_DRAW_FRAMEBUFFER, id);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
*
* Copyright (c) 2015 - 2025 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.gl.Framebuffer;
import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.util.Handle;
import net.minecraft.util.Identifier;

import javax.annotation.Nullable;
import java.util.HashMap;

/**
* Stupid class, but Minecraft needed one more abstraction...
*/
public record MapBackedFramebufferSet(
HashMap<Identifier, Handle<Framebuffer>> backingMap
) implements PostEffectProcessor.FramebufferSet {

@Override
public void set(Identifier id, Handle<Framebuffer> framebuffer) {
this.backingMap.put(id, framebuffer);
}

@Override
public @Nullable Handle<Framebuffer> get(Identifier id) {
return this.backingMap.get(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
*/
package net.ccbluex.liquidbounce.common;

public class OutlineFlag {
public final class OutlineFlag {
public static boolean drawOutline = false;
}
Loading
Loading