Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
- Add ability to create condensed entries from stacks
- Pass registry access for entrypoint if needed
- Remove lexforge support
- Fix mixin target for neo
  • Loading branch information
Dragon-Seeker committed Aug 1, 2024
1 parent 60022ba commit 6089db3
Show file tree
Hide file tree
Showing 38 changed files with 408 additions and 549 deletions.
46 changes: 29 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
}

architectury {
Expand All @@ -9,21 +9,45 @@ architectury {

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "maven-publish"

loom {
silentMojangMappingsLicense()
}

repositories {
maven { url "https://maven.parchmentmc.org" }
maven { url "https://maven.wispforest.io/releases" }
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"

mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.20.4:2024.04.14@zip")
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
}
}

def ENV = System.getenv()

publishing {
publications {
mavenForge(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
from components.java
}
}

repositories {
maven {
url ENV.MAVEN_URL

credentials {
username ENV.MAVEN_USER
password ENV.MAVEN_PASSWORD
}
}
}
}
}
Expand All @@ -33,7 +57,6 @@ def ENV = System.getenv()
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
Expand All @@ -42,24 +65,13 @@ allprojects {
repositories {
maven { url 'https://maven.wispforest.io' }
maven { url "https://maven.shedaniel.me/" }
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
url "https://maven.terraformersmc.com/releases/"
content {
includeGroup "com.terraformersmc"
}
}
maven { url "https://api.modrinth.com/maven" }
maven { url "https://maven.terraformersmc.com/releases/" }
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
options.release = 21
}

java {
Expand Down
28 changes: 1 addition & 27 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,7 @@ loom {
}

dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixins dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
// Remove the next line if you don't want to depend on the API
//modApi "dev.architectury:architectury:${rootProject.architectury_version}"

modImplementation("me.shedaniel.cloth:cloth-config:${rootProject.cloth_config}")
}

def ENV = System.getenv()

publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archives_base_name
from components.java
}
}

repositories {
maven {
url ENV.MAVEN_URL

credentials {
username ENV.MAVEN_USER
password ENV.MAVEN_PASSWORD
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static boolean isDeveloperMode(){
return DEBUG_ENV || DEBUG;
}

public static ResourceLocation createID(String path){
return new ResourceLocation(MODID, path);
public static ResourceLocation location(String path){
return ResourceLocation.fromNamespaceAndPath(MODID, path);
}

//---------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public class SlotRenderUtils {

private static final ResourceLocation PLUS_ICON = CondensedCreative.createID("textures/gui/plus_logo.png");
private static final ResourceLocation MINUS_ICON = CondensedCreative.createID("textures/gui/minus_logo.png");
private static final ResourceLocation PLUS_ICON = CondensedCreative.location("textures/gui/plus_logo.png");
private static final ResourceLocation MINUS_ICON = CondensedCreative.location("textures/gui/minus_logo.png");

public static void renderExtraIfEntry(AbstractContainerScreen screen, GuiGraphics context, Slot slot){
if(!(screen instanceof CreativeModeInventoryScreen && slot.container instanceof CondensedInventory inv)) return;
Expand Down
Loading

0 comments on commit 6089db3

Please sign in to comment.