Skip to content

Commit

Permalink
1.19.1 port
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzss committed Aug 1, 2022
1 parent 2432cc2 commit a486ac6
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 95 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ run/*
!run/config
run/config/*
!run/config/modmenu.json
!run/config/fabric_loader_dependencies.json

# Log file
*.log
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog].

## [v4.1.0-1.19.1] - 2022-08-01
- Compiled for Minecraft 1.19.1
- Updated to Puzzles Lib v4.1.0

## [v4.0.0-1.19] - 2022-07-19
- Ported to Minecraft 1.19
- Split into multi-loader project
Expand Down
36 changes: 22 additions & 14 deletions Common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ dependencies {
// parchment("org.parchmentmc.data:parchment-${minecraftVersion}:${parchmentMappingsVersion}@zip")
}

// Common Dependencies
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
compileOnly 'com.electronwill.night-config:core:3.6.5'
compileOnly 'com.electronwill.night-config:toml:3.6.5'
// Mixin Dependencies
implementation 'org.ow2.asm:asm-tree:9.2'
implementation 'org.ow2.asm:asm-commons:9.2'
implementation 'org.ow2.asm:asm-util:9.2'
implementation 'org.spongepowered:mixin:0.8.5'

// Config Dependencies
implementation 'com.electronwill.night-config:core:3.6.5'
implementation 'com.electronwill.night-config:toml:3.6.5'

// Puzzles Lib
modImplementation "fuzs.puzzleslib:puzzleslib-common:${puzzlesVersion}"

modCompileOnlyApi "mezz.jei:jei-1.19-common-api:11.0.2.230"
modApi "mezz.jei:jei-1.19.1-common-api:11.2.0.241"
}

loom {
Expand Down Expand Up @@ -84,15 +89,6 @@ publishing {
artifactId = "${modId}-common"
version = modVersion
from components.java
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
if ([].stream().anyMatch(mod -> dep.artifactId.last().value().last().contains(mod))) {
assert dep.parent().remove(dep)
}
}
}
pom {
name = "${modName} [Common]"
description = "${modDescription}"
Expand All @@ -119,6 +115,18 @@ publishing {
}
}
}
afterEvaluate {
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
// use this approach to make excluding dependencies from Curse Maven more convenient
if ([].stream().anyMatch(mod -> "${dep.groupId.last().value().last()}:${dep.artifactId.last().value().last()}".startsWith(mod))) {
assert dep.parent().remove(dep)
}
}
}
}
}
}
repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fuzs.visualworkbench;

import fuzs.puzzleslib.config.ConfigHolderV2;
import fuzs.puzzleslib.config.ConfigHolder;
import fuzs.puzzleslib.core.CoreServices;
import fuzs.puzzleslib.core.ModConstructor;
import fuzs.visualworkbench.config.ClientConfig;
Expand All @@ -15,7 +15,7 @@ public class VisualWorkbench implements ModConstructor {
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_NAME);

@SuppressWarnings("Convert2MethodRef")
public static final ConfigHolderV2 CONFIG = CoreServices.FACTORIES.client(ClientConfig.class, () -> new ClientConfig());
public static final ConfigHolder CONFIG = CoreServices.FACTORIES.clientConfig(ClientConfig.class, () -> new ClientConfig());

@Override
public void onConstructMod() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package fuzs.visualworkbench.config;

import fuzs.puzzleslib.config.AbstractConfig;
import fuzs.puzzleslib.config.ConfigCore;
import fuzs.puzzleslib.config.annotation.Config;

public class ClientConfig extends AbstractConfig {
public class ClientConfig implements ConfigCore {
@Config(description = "Makes crafting table contents lay flat on the table instead of floating above.")
public boolean flatRendering = false;
@Config(description = "Render the result of the crafting operation in addition to crafting table contents.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package fuzs.visualworkbench.registry;

import fuzs.puzzleslib.core.CoreServices;
import fuzs.puzzleslib.registry.RegistryManager;
import fuzs.puzzleslib.registry.RegistryReference;
import fuzs.puzzleslib.registry.builder.ModBlockEntityTypeBuilder;
import fuzs.puzzleslib.init.RegistryManager;
import fuzs.puzzleslib.init.RegistryReference;
import fuzs.puzzleslib.init.builder.ModBlockEntityTypeBuilder;
import fuzs.visualworkbench.VisualWorkbench;
import fuzs.visualworkbench.config.JsonConfigBuilder;
import fuzs.visualworkbench.world.inventory.ModCraftingMenu;
Expand Down
44 changes: 23 additions & 21 deletions Fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,20 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}"

// Forge Configs
modImplementation "net.minecraftforge:forgeconfigapiport-fabric:4.0.0"
modImplementation "net.minecraftforge:forgeconfigapiport-fabric:4.1.2"

// Mod Menu
modImplementation "com.terraformersmc:modmenu:4.0.0"

modRuntimeOnly "mezz.jei:jei-1.19-fabric:11.0.2.230"
modRuntimeOnly("me.shedaniel.cloth:cloth-config-fabric:5.0.34") {
exclude(group: "net.fabricmc.fabric-api")
}
modRuntimeOnly "curse.maven:balmfabric-500525:3850459"
modRuntimeOnly "curse.maven:craftingtweaksfabric-502516:3835115"
modRuntimeOnly "com.terraformersmc:modmenu:4.0.5"

// Puzzles Lib
modImplementation "fuzs.puzzleslib:puzzleslib-fabric:${puzzlesVersion}"
// try use curse maven when no other option is available
// file id is end of url (7 digits usually) when on file details page on curse
// modImplementation "curse.maven:puzzleslib-<project-id>:<file-id>"

modRuntimeOnly "mezz.jei:jei-1.19.1-fabric:11.2.0.241"
modRuntimeOnly("me.shedaniel.cloth:cloth-config-fabric:8.0.75") {
exclude(group: "net.fabricmc.fabric-api")
}
modRuntimeOnly "curse.maven:balmfabric-500525:3901902"
modRuntimeOnly "curse.maven:craftingtweaksfabric-502516:3901909"
}

loom {
Expand All @@ -75,12 +72,14 @@ loom {
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("../run")
vmArg '-Dmixin.debug.export=true'
}
server {
server()
setConfigName("Fabric Server")
ideConfigGenerated(true)
runDir("../run")
vmArg '-Dmixin.debug.export=true'
}
}
}
Expand Down Expand Up @@ -159,15 +158,6 @@ publishing {
artifactId = "${modId}-fabric"
version = modVersion
from components.java
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
if (["modmenu"].stream().anyMatch(mod -> dep.artifactId.last().value().last().contains(mod))) {
assert dep.parent().remove(dep)
}
}
}
pom {
name = "${modName} [Fabric]"
description = "${modDescription}"
Expand All @@ -194,6 +184,18 @@ publishing {
}
}
}
afterEvaluate {
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
// use this approach to make excluding dependencies from Curse Maven more convenient
if (["com.terraformersmc:modmenu"].stream().anyMatch(mod -> "${dep.groupId.last().value().last()}:${dep.artifactId.last().value().last()}".startsWith(mod))) {
assert dep.parent().remove(dep)
}
}
}
}
}
}
repositories {
Expand Down
43 changes: 24 additions & 19 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ minecraft {
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
modClientRun {
source sourceSets.main
Expand All @@ -69,6 +70,7 @@ minecraft {
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
modServerRun {
source sourceSets.main
Expand All @@ -92,6 +94,7 @@ minecraft {
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
modDataRun {
source sourceSets.main
Expand All @@ -112,19 +115,16 @@ dependencies {

// Quality of Life Mods
runtimeOnly fg.deobf("curse.maven:catalogue-459701:3873264")
runtimeOnly fg.deobf("fuzs.bettermodsbutton:bettermodsbutton-forge:4.0.1")
runtimeOnly fg.deobf("fuzs.bettermodsbutton:bettermodsbutton-forge:4.1.2")
// runtimeOnly fg.deobf("curse.maven:configmenusforge-544048:3822820")
// runtimeOnly fg.deobf("curse.maven:configured-457570:3872190")

runtimeOnly fg.deobf("mezz.jei:jei-1.19-forge:11.0.2.230")
runtimeOnly fg.deobf("curse.maven:balm-531761:3881348")
runtimeOnly fg.deobf("curse.maven:craftingtweaks-233071:3832466")
// runtimeOnly fg.deobf("curse.maven:configured-457570:3903908")

// Puzzles Lib
implementation fg.deobf("fuzs.puzzleslib:puzzleslib-forge:${puzzlesVersion}")
// try use curse maven when no other option is available
// file id is end of url (7 digits usually) when on file details page on curse
// implementation fg.deobf("curse.maven:puzzles-lib:<file-id>")

runtimeOnly fg.deobf("mezz.jei:jei-1.19.1-forge:11.2.0.241")
runtimeOnly fg.deobf("curse.maven:balm-531761:3901901")
runtimeOnly fg.deobf("curse.maven:craftingtweaks-233071:3901912")
}

mixin {
Expand Down Expand Up @@ -213,16 +213,8 @@ publishing {
artifactId = "${modId}-forge"
version = modVersion
from components.java
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
// we need to exclude Forge itself, which could be problematic for any mod containing 'forge' in its name, but shouldn't really affect many though
if (["catalogue", "bettermodsbutton", "configmenusforge", "configured", "forge"].stream().anyMatch(mod -> dep.artifactId.last().value().last().contains(mod))) {
assert dep.parent().remove(dep)
}
}
}
// strip Forge dependency from POM
fg.component(it)
pom {
name = "${modName} [Forge]"
description = "${modDescription}"
Expand All @@ -249,6 +241,19 @@ publishing {
}
}
}
afterEvaluate {
// exclude certain dependencies when publishing to maven
// from https://stackoverflow.com/a/50121790
pom.withXml {
asNode().dependencies.dependency.each { dep ->
// Forge is weird as a dependency, so skip it along with quality of life mods
// use this approach to make excluding dependencies from Curse Maven more convenient
if (["curse.maven:catalogue", "curse.maven:configured", "curse.maven:configmenusforge", "fuzs.bettermodsbutton:bettermodsbutton-forge"].stream().anyMatch(mod -> "${dep.groupId.last().value().last()}:${dep.artifactId.last().value().last()}".startsWith(mod))) {
assert dep.parent().remove(dep)
}
}
}
}
}
}
repositories {
Expand Down
24 changes: 11 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@ org.gradle.daemon=false
org.gradle.parallel=true

# Common Project
minecraftVersion=1.19
minMinecraftVersion=1.19
quiltVersion=0.17.0
minecraftVersion=1.19.1
minMinecraftVersion=1.19.1
parchmentMappingsVersion=2022.05.22
puzzlesVersion=4.0.14
minPuzzlesVersion=4.0.14
puzzlesVersion=4.1.0
minPuzzlesVersion=4.1.0
packFormat=9
enableHotswap=false
copyBuildJar=true

# Forge Project
forgeVersion=1.19-41.0.98
minForgeVersion=41.0.98
forgeVersion=1.19.1-42.0.0
minForgeVersion=42.0.0

# Fabric Project
fabricVersion=0.14.7
fabricVersion=0.14.8
minFabricVersion=0.14
fabricApiVersion=0.55.2+1.19
minFabricApiVersion=0.55.1
fabricApiVersion=0.58.5+1.19.1
minFabricApiVersion=0.58.5

# Mod Attributes
modId=visualworkbench
modName=Visual Workbench
modVersion=4.0.0
modVersion=4.1.0
modAuthor=Fuzs
modDescription=Items stay inside of crafting tables and are also rendered on top. It's really fancy!
modSourceUrl=https://github.com/Fuzss/visualworkbench
Expand All @@ -42,6 +40,6 @@ modFabricEnvironment=*

# Mod Publishing
projectReleaseType=release
projectGameVersions=1.19
projectGameVersions=1.19.1
projectCurseId=500273
projectModrinthId=kfqD1JRw
9 changes: 0 additions & 9 deletions gradle/tasks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ task fabricGenSources(type: GradleBuild) {
]
}

task allSetupWorkspace(type: GradleBuild) {
group = '_main'
tasks = [
':Common:genSourcesWithQuiltflower',
':Fabric:genSourcesWithQuiltflower',
':Forge:genIntellijRuns'
]
}

task forgeClient(type: GradleBuild) {
group = '_main'
tasks = [
Expand Down
11 changes: 0 additions & 11 deletions run/config/fabric_loader_dependencies.json

This file was deleted.

0 comments on commit a486ac6

Please sign in to comment.