Skip to content

Commit

Permalink
1.21.4 update for fabric only
Browse files Browse the repository at this point in the history
can't figure out neoforge
  • Loading branch information
triphora committed Jan 11, 2025
1 parent f655d5b commit db7ca4b
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
with:
gradle-version: release-candidate
arguments: neoforge:modrinth fabric:modrinth
arguments: fabric:modrinth
cache-read-only: ${{ github.repository_owner != 'triphora' }}
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<!-- modrinth_exclude.end -->

![Forge](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/supported/forge_64h.png) ![Fabric](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/supported/fabric_64h.png)<br>
[![Modrinth](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/download/modrinth_64h.png)](https://modrinth.com/mod/emcutils) [![GitHub](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/repository/github_64h.png)](https://github.com/emmods/emcutils)
[![Modrinth](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/download/modrinth_64h.png)](https://modrinth.com/mod/emcutils) [![GitHub](https://raw.githubusercontent.com/intergrav/devins-badges/v1/assets/repository/github_64h.png)](https://github.com/triphora/emcutils)

Empire Minecraft Utilities, aka emcutils, is a 1.16-1.19 client-side mod containing a collection of small utilities for players of [Empire Minecraft](https://ref.emc.gs/triphora).
Empire Minecraft Utilities, aka emcutils, is a client-side mod containing a collection of small utilities for players of [Empire Minecraft](https://ref.emc.gs/triphora).
Feature idea credits go to [Giselbaer](https://u.emc.gs/Giselbaer)/[gbl](https://github.com/gbl).

Made by [MrFrydae](https://u.emc.gs/GreenMeanie) and [triphora](https://u.emc.gs/triphora), available under the MIT License.
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ dependencies {
modImplementation libs.fabric.loader
}

architectury.common 'fabric', 'forge', 'neoforge'
architectury.common 'fabric'

loom.accessWidenerPath.set file('src/main/resources/emcutils.accesswidener')
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import coffee.waffle.emcutils.Config;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.ProfileComponent;
import net.minecraft.entity.player.PlayerInventory;
Expand Down Expand Up @@ -38,7 +37,6 @@ public class VaultScreen extends HandledScreen<VaultScreenHandler> implements Sc

public VaultScreen(VaultScreenHandler handler, PlayerInventory inventory, Text title) {
super(handler, inventory, title);
//this.passEvents = false;
this.backgroundHeight = 114 + 7 * 18;
this.playerInventoryTitleY = this.backgroundHeight - 94;

Expand Down Expand Up @@ -106,12 +104,9 @@ private void drawButton(DrawContext context, ItemStack button, int mouseX, int m

@Override
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) {
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShaderTexture(0, TEXTURE);
int x = (width - backgroundWidth) / 2;
int y = (height - backgroundHeight) / 2;
context.drawTexture(TEXTURE, x, y, 0, 0, backgroundWidth, backgroundHeight);
context.drawTexture(RenderLayer::getGuiTextured, TEXTURE, x, y, 0, 0, backgroundWidth, backgroundHeight, 256, 256);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
],
"accessWidener": "emcutils.accesswidener",
"depends": {
"minecraft": ">=1.20.4",
"midnightlib": ">=1.5.3"
"minecraft": ">=1.21.4",
"midnightlib": ">=1.6.6"
},
"recommends": {
"modmenu": ">=9.1.0"
"modmenu": ">=13.0.0"
},
"custom": {
"modmenu": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package coffee.waffle.emcutils.forge;

import coffee.waffle.emcutils.event.TooltipCallback;
import coffee.waffle.emcutils.feature.VaultScreen;
import coffee.waffle.emcutils.Util;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.IExtensionPoint.DisplayTest;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
Expand All @@ -25,14 +23,14 @@

@Mod(MODID)
public class EMCUtilsForge {
public EMCUtilsForge() {
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetupEvent);
public EMCUtilsForge(FMLJavaModLoadingContext context) {
context.getModEventBus().addListener(this::clientSetupEvent);

ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigImpl.SPEC);
context.registerConfig(ModConfig.Type.CLIENT, ConfigImpl.SPEC);

movePacks("vt-dark-vault", "dark-ui-vault");

ModLoadingContext.get().registerExtensionPoint(DisplayTest.class, () -> new DisplayTest(() -> "", (a, b) -> b));
context.registerExtensionPoint(DisplayTest.class, () -> new DisplayTest(() -> "", (a, b) -> b));

LOG.info("Initialized " + MODID);
}
Expand Down
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
modLoader = "javafml"
loaderVersion = "[44,)"
issueTrackerURL = "https://github.com/emmods/emcutils/issues"
issueTrackerURL = "https://github.com/triphora/emcutils/issues"
license = "MIT"

[[mods]]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true

mod_version=9.0.2
mod_version=9.1.0
36 changes: 18 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
[versions]
minecraft = '1.21'
minecraft = '1.21.4'

[libraries]
# MC, loaders, and mappings
minecraft = { module = 'com.mojang:minecraft', version.ref = 'minecraft' }
# https://fabricmc.net/develop
yarn = 'net.fabricmc:yarn:1.21+build.2'
fabric_loader = 'net.fabricmc:fabric-loader:0.15.11'
fabric_api = 'net.fabricmc.fabric-api:fabric-api:0.100.3+1.21'
yarn = 'net.fabricmc:yarn:1.21.4+build.8'
fabric_loader = 'net.fabricmc:fabric-loader:0.16.10'
fabric_api = 'net.fabricmc.fabric-api:fabric-api:0.114.2+1.21.4'
# https://maven.architectury.dev/dev/architectury/yarn-mappings-patch-neoforge/1.21%2Bbuild.4/
yarn_patch = "dev.architectury:yarn-mappings-patch-neoforge:1.21+build.4"
# https://files.minecraftforge.net/net/minecraftforge/forge/index_1.21.html
forge = 'net.minecraftforge:forge:1.21-51.0.18'
# https://files.minecraftforge.net/net/minecraftforge/forge/index_1.21.4.html
forge = 'net.minecraftforge:forge:1.21.4-54.0.16'
# https://neoforged.net
neoforge = 'net.neoforged:neoforge:21.0.37-beta'
neoforge = 'net.neoforged:neoforge:21.4.51-beta'

# Fabric subproject
# https://modrinth.com/mod/midnightlib/version/latest?loader=fabric&game_version=1.21
midnightlib = 'maven.modrinth:midnightlib:1.5.7-fabric'
midnightlib = 'maven.modrinth:midnightlib:1.6.6-fabric'
# https://modrinth.com/mod/modmenu/version/latest?loader=fabric&game_version=1.21
modmenu = 'maven.modrinth:modmenu:11.0.1'
modmenu = 'maven.modrinth:modmenu:13.0.0'

# Journey subproject
# https://jm.gserv.me/service/rest/repository/browse/maven-public/info/journeymap/journeymap-api-fabric/
journeymap_api = 'info.journeymap:journeymap-api-fabric:2.0.0-1.21-SNAPSHOT'
# https://modrinth.com/mod/journeymap/version/latest?loader=fabric&game_version=1.21
journeymap = 'maven.modrinth:journeymap:1.20.6-5.10.0-fabric'
journeymap_api = 'info.journeymap:journeymap-api-fabric:2.0.0-1.21.4-SNAPSHOT'
# https://modrinth.com/mod/journeymap/version/latest?loader=fabric&game_version=1.21.4
journeymap = 'maven.modrinth:journeymap:1.21.4-6.0.0-beta.32+fabric'

# Xaero subproject
# https://modrinth.com/mod/xaeros-minimap/version/latest?loader=fabric&game_version=1.21
xaeros_minimap = 'maven.modrinth:xaeros-minimap:24.2.1_Fabric_1.21'
# https://modrinth.com/mod/xaeros-world-map/version/latest?loader=fabric&game_version=1.21
xaeros_world_map = 'maven.modrinth:xaeros-world-map:1.38.8_Fabric_1.21'
# https://modrinth.com/mod/xaeros-minimap/version/latest?loader=fabric&game_version=1.21.4
xaeros_minimap = 'maven.modrinth:xaeros-minimap:24.7.1_Fabric_1.21.4'
# https://modrinth.com/mod/xaeros-world-map/version/latest?loader=fabric&game_version=1.21.4
xaeros_world_map = 'maven.modrinth:xaeros-world-map:1.39.2_Fabric_1.21.4'

[plugins]
architectury_plugin = 'architectury-plugin:3.4.+'
architectury_loom = 'dev.architectury.loom:1.6.+'
architectury_loom = 'dev.architectury.loom:1.7.+'

minotaur = 'com.modrinth.minotaur:2.+'
shadow = 'com.github.johnrengelman.shadow:8.+'
shadow = 'com.gradleup.shadow:9.+'
32 changes: 20 additions & 12 deletions gradle/loader.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,37 @@ String projectName = "${name.substring(0, 1).toUpperCase()}${name.substring(1)}"
if (projectName == 'Neoforge') projectName = 'NeoForge'

configurations {
common
shadowCommon
common {
canBeResolved = true
canBeConsumed = false
}

compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common

shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}

dependencies {
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowCommon(project(path: ':common', configuration: "transformProduction$projectName")) { transitive false }
common(project(path: ':common', configuration: 'namedElements')) { transitive = false }
shadowBundle project(path: ':common', configuration: "transformProduction$projectName")
}

shadowJar {
configurations = [project.configurations.shadowCommon]
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}

remapJar {
inputFile.set shadowJar.archiveFile

archiveClassifier = null
//archiveClassifier = null
}

jar.archiveClassifier = 'dev'
//jar.archiveClassifier = 'dev'

sourcesJar {
def commonSources = project(':common').sourcesJar
Expand All @@ -39,11 +47,11 @@ sourcesJar {
exclude 'emcutils.accesswidener'
}

components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
//components.java {
// withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
// skip()
// }
//}

modrinth {
projectId = 'emcutils'
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ loom {
}

configurations {
developmentForge.extendsFrom common
developmentNeoForge.extendsFrom common
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import coffee.waffle.emcutils.event.TooltipCallback;
import coffee.waffle.emcutils.feature.VaultScreen;
import coffee.waffle.emcutils.Util;
import net.minecraft.registry.Registries;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
Expand All @@ -14,7 +13,6 @@
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.fml.loading.FMLPaths;
import net.neoforged.neoforge.registries.DeferredRegister;

import java.io.IOException;
import java.io.InputStream;
Expand Down
2 changes: 1 addition & 1 deletion neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
modLoader = "javafml"
loaderVersion = "[4,)"
issueTrackerURL = "https://github.com/emmods/emcutils/issues"
issueTrackerURL = "https://github.com/triphora/emcutils/issues"
license = "MIT"

[[mods]]
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

include 'common'
include 'fabric'
include 'forge'
//include 'forge'
include 'journey'
include 'neoforge'
//include 'neoforge'
include 'xaero'

0 comments on commit db7ca4b

Please sign in to comment.