Skip to content

Commit

Permalink
ornithe
Browse files Browse the repository at this point in the history
  • Loading branch information
tildejustin committed Dec 12, 2023
1 parent 4405719 commit aa0edcd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
16 changes: 2 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias libs.plugins.fabric.loom
alias libs.plugins.legacy.looming
alias libs.plugins.ploceus
id "maven-publish"
}

Expand All @@ -12,25 +12,13 @@ base {
}

repositories {
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://jitpack.io" }
}

loom {
decompilers {
vineflower {
options.put("mark-corresponding-synthetics", "1")
options.put("ind", " ")
}
}
accessWidenerPath = file("src/main/resources/optifabric.accesswidener")
}

dependencies {
minecraft libs.minecraft
mappings legacy.yarn(libs.versions.minecraft.get(), libs.versions.yarn.build.get())
mappings variantOf(libs.feather.mappings) { classifier "v2" }
modImplementation libs.fabric.loader
vineflowerDecompilerClasspath libs.vineflower
include(modImplementation libs.fabric.asm.get())
include(implementation libs.zt.zip.get())
include(runtimeOnly libs.slf4j.api.get())
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
mod_version=2.1.0
target_version=1.6-1.7.10
target_version=1.6-1.7.10-ornithe
archives_name=optifabric
maven_group=me.modmuss50
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[versions]
minecraft = "1.7.10"
yarn_build = "533"
feather-mappings = "1.7.10+build.25"
fabric-loader = "0.15.1"
loom = "1.4-SNAPSHOT"
vineflower = "1.10.0-SNAPSHOT"
fabric-asm = "v2.3.3"
zt-zip = "1.16"
slf4j-api = "2.0.9"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
feather-mappings = { module = "net.ornithemc:feather", version.ref = "feather-mappings" }
fabric-loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric-loader" }
vineflower = { module = "org.vineflower:vineflower", version.ref = "vineflower" }
fabric-asm = { module = "com.github.Minecraft-Java-Edition-Speedrunning:fabric-asm", version.ref = "fabric-asm" }
zt-zip = { module = "org.zeroturnaround:zt-zip", version.ref = "zt-zip" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-api" }

[plugins]
fabric_loom = { id = "fabric-loom", version.ref = "loom" }
legacy_looming = { id = "legacy-looming", version.ref = "loom" }
ploceus = { id = "ploceus", version.ref = "loom" }
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pluginManagement {
repositories {
maven { url "https://maven.fabricmc.net" }
maven { url "https://repo.legacyfabric.net/repository/legacyfabric" }
maven { url "https://maven.ornithemc.net/releases" }
maven { url "https://maven.ornithemc.net/snapshots" }
mavenCentral()
gradlePluginPortal()
mavenLocal()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.modmuss50.optifabric.mixin;

import me.modmuss50.optifabric.mod.*;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.*;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.*;
Expand All @@ -16,6 +16,6 @@ private void init(CallbackInfo info) {

@Inject(method = "render", at = @At("RETURN"))
private void render(CallbackInfo ci) {
if (!Optifabric.hasError()) this.drawWithShadow(MinecraftClient.getInstance().textRenderer, OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF);
if (!Optifabric.hasError()) this.drawString(Minecraft.getInstance().textRenderer, OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/optifabric.accesswidener
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessWidener v2 named
accessible field net/minecraft/client/gui/widget/ButtonWidget width I
accessible field net/minecraft/client/gui/widget/ButtonWidget height I
accessible method net/minecraft/util/Language getInstance ()Lnet/minecraft/util/Language;
accessible method net/minecraft/locale/Language getInstance ()Lnet/minecraft/locale/Language;
accessible method net/minecraft/block/Block setOpacity (I)Lnet/minecraft/block/Block;

0 comments on commit aa0edcd

Please sign in to comment.