Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions build-src/src/main/kotlin/moulconfig.fabric.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ plugins {

val fabricVersion = property("moulconfig.fabric") as String
val minecraftVersion = property("moulconfig.minecraft") as String
val snapshotVersion = findProperty("moulconfig.snapshot") as String?
val aF = project.file("src/main/resources/moulconfig.accesswidener")
val hasAW = aF.exists()
the<UniminedExtension>().minecraft {
version(minecraftVersion)
version(snapshotVersion ?: minecraftVersion)
mappings {
intermediary()
yarn(property("moulconfig.yarn") as String)
}

fabric {
loader("0.17.2")
loader("0.17.3")
if (hasAW)
accessWidener(aF)
}
Expand Down
9 changes: 9 additions & 0 deletions modern/1.21.11/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id("moulconfig.fabric")
}
fabricDeps {
impl("fabric-command-api-v2")
}

java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))

4 changes: 4 additions & 0 deletions modern/1.21.11/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
moulconfig.minecraft=1.21.11
moulconfig.yarn=2
moulconfig.fabric=0.135.1+1.21.11
moulconfig.snapshot=25w41a
17 changes: 17 additions & 0 deletions modern/1.21.11/src/main/resources/moulconfig.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
accessWidener v2 named

accessible method net/minecraft/client/gui/DrawContext setScissor (Lnet/minecraft/client/gui/ScreenRect;)V
accessible field net/minecraft/client/gui/DrawContext scissorStack Lnet/minecraft/client/gui/DrawContext$ScissorStack;
accessible method net/minecraft/client/gui/DrawContext drawTexturedQuad (Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIIIFFFFI)V
accessible class net/minecraft/client/gui/DrawContext$ScissorStack
accessible method net/minecraft/client/gui/DrawContext fill (Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/client/texture/TextureSetup;IIIIILjava/lang/Integer;)V
accessible field net/minecraft/client/gui/DrawContext$ScissorStack stack Ljava/util/Deque;
accessible method net/minecraft/client/gui/DrawContext fill (Lcom/mojang/blaze3d/pipeline/RenderPipeline;IIIII)V
accessible method net/minecraft/client/gui/DrawContext drawTexturedQuad (Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/util/Identifier;IIIIFFFFI)V
accessible field net/minecraft/client/render/GameRenderer guiState Lnet/minecraft/client/gui/render/state/GuiRenderState;
accessible field net/minecraft/client/gl/RenderPipelines GUI_SNIPPET Lcom/mojang/blaze3d/pipeline/RenderPipeline$Snippet;
accessible method net/minecraft/client/render/RenderLayer of (Ljava/lang/String;ILcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/client/render/RenderLayer$MultiPhaseParameters;)Lnet/minecraft/client/render/RenderLayer$MultiPhase;
accessible class net/minecraft/client/render/RenderLayer$MultiPhase
accessible class net/minecraft/client/render/RenderLayer$MultiPhaseParameters
accessible method net/minecraft/client/render/RenderLayer$MultiPhaseParameters$Builder build (Z)Lnet/minecraft/client/render/RenderLayer$MultiPhaseParameters;
accessible field net/minecraft/client/gui/DrawContext state Lnet/minecraft/client/gui/render/state/GuiRenderState;
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,14 @@ public void drawTexturedTintedRect(MyResourceLocation texture, float x, float y,
var identifier = MoulConfigPlatform.unwrap(texture);
mc.getTextureManager()
.getTexture(identifier)
#if MC < 12111
.setFilter(
switch (filter) {
case LINEAR -> true;
case NEAREST -> false;
},
false
);
)#endif;
drawContext.drawTexturedQuad(
#if MC217 RenderPipelines.GUI_TEXTURED #else RenderLayer::getGuiTextured #endif,
identifier,
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ listOf(
"1.21.5",
"1.21.7",
"1.21.10",
"1.21.11",
).forEach { version ->
val modPath = "modern:$version"
include(modPath)
Expand Down