Skip to content

Commit

Permalink
new 1.20.1 setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzss committed Jun 27, 2023
1 parent 09d271f commit 65e550b
Show file tree
Hide file tree
Showing 117 changed files with 1,843 additions and 1,238 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: >-
Please use this template when you have encountered a bug in this mod. Supported versions are for Minecraft 1.18+.
Please use this template when you have encountered a bug in this mod. Please note that only the latest mod version for Minecraft 1.18.2, 1.19.2 and 1.20.1 is supported.
title: '[Bug]: '
labels: ["bug"]
assignees:
Expand All @@ -27,15 +27,15 @@ body:
attributes:
label: Minecraft Version (Required)
description: What is the Minecraft version you are playing with?
placeholder: ex. 1.19
placeholder: ex. 1.20.1
validations:
required: true
- type: input
id: version
attributes:
label: Mod Version (Required)
description: What version of the mod are you playing with?
placeholder: ex. v4.0.0
placeholder: ex. v8.0.0
validations:
required: true
- type: textarea
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/crash.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Crash Report
description: >-
Please use this template when this mod has caused your game to crash. Supported versions are for Minecraft 1.18+.
Please use this template when this mod has caused your game to crash. Please note that only the latest mod version for Minecraft 1.18.2, 1.19.2 and 1.20.1 is supported.
title: '[Crash]: '
labels: ["bug"]
assignees:
Expand All @@ -27,15 +27,15 @@ body:
attributes:
label: Minecraft Version (Required)
description: What is the Minecraft version you are playing with?
placeholder: ex. 1.19
placeholder: ex. 1.20.1
validations:
required: true
- type: input
id: version
attributes:
label: Mod Version (Required)
description: What version of the mod are you playing with?
placeholder: ex. v4.0.0
placeholder: ex. v8.0.0
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Suggestion
description: >-
Please use this template when you want to suggest a feature. Do not ask for mod updates or ports, they will come when they are ready.
Please use this template when you want to suggest a feature. Please do not ask for mod updates or ports, they will come when they are ready.
title: '[Suggestion]: '
labels: ["enhancement"]
assignees:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ classes
*.ipr
*.iws
*.iml
.idea/*
!.idea/scopes
**/.idea/*
!**/.idea/scopes
!.idea/gradle.xml

### NetBeans ###
nbproject/private/
Expand Down
44 changes: 44 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 1.18/.idea/scopes/Fabric_sources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 1.18/.idea/scopes/Forge_sources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions CHANGELOG.md → 1.18/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog].

## [v7.0.0-1.20] - 2023-06-12
- Ported to Minecraft 1.20
## [v3.0.0-1.18.2] - 2023-06-25
- Ported to Minecraft 1.18.2

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
11 changes: 11 additions & 0 deletions 1.18/Common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply from: 'https://raw.githubusercontent.com/Fuzss/modresources/main/gradle/common.gradle'

dependencies {
// Puzzles Lib
modApi libs.puzzleslib.common
}

// @see https://github.com/jaredlll08/MultiLoader-Template/issues/17#issuecomment-1221598082
tasks.withType(net.fabricmc.loom.task.AbstractRemapJarTask).each {
it.targetNamespace = "named"
}
16 changes: 16 additions & 0 deletions 1.18/Common/src/main/java/fuzs/examplemod/ExampleMod.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package fuzs.examplemod;

import fuzs.puzzleslib.api.core.v1.ModConstructor;
import net.minecraft.resources.ResourceLocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ExampleMod implements ModConstructor {
public static final String MOD_ID = "examplemod";
public static final String MOD_NAME = "Example Mod";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_NAME);

public static ResourceLocation id(String path) {
return new ResourceLocation(MOD_ID, path);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package fuzs.examplemod.client;

import fuzs.puzzleslib.api.client.core.v1.ClientModConstructor;

public class ExampleModClient implements ClientModConstructor {

}
15 changes: 15 additions & 0 deletions 1.18/Common/src/main/resources/examplemod.common.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"required": true,
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"package": "fuzs.examplemod.mixin",
"refmap": "examplemod.refmap.json",
"plugin": "fuzs.examplemod.mixin.ModMixinConfigPlugin",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}
Binary file added 1.18/Common/src/main/resources/mod_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 1.18/Common/src/main/resources/mod_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
29 changes: 29 additions & 0 deletions 1.18/Fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apply from: 'https://raw.githubusercontent.com/Fuzss/modresources/main/gradle/fabric.gradle'

def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")

dependencies {
// Fabric Api
modApi libs.fabricapi.fabric

// Puzzles Lib
modApi libs.puzzleslib.fabric

// Cardinal Components
// modApi(include(libs.cardinalcomponentsbase.fabric.get()))
// modApi(include(libs.cardinalcomponentsentity.fabric.get()))
// modApi(include(libs.cardinalcomponentsblock.fabric.get()))
// modApi(include(libs.cardinalcomponentschunk.fabric.get()))
// modApi(include(libs.cardinalcomponentsworld.fabric.get()))

// Extensible Enums
// modApi(include(libs.extensibleenums.fabric.get()))

// Quality of Life Mods
versionCatalog.findLibrary("modmenu.fabric").ifPresent {
modLocalRuntime(it)
}
versionCatalog.findLibrary("forgeconfigscreens.fabric").ifPresent {
modLocalRuntime(it)
}
}
12 changes: 12 additions & 0 deletions 1.18/Fabric/src/main/java/fuzs/examplemod/ExampleModFabric.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package fuzs.examplemod;

import fuzs.puzzleslib.api.core.v1.ModConstructor;
import net.fabricmc.api.ModInitializer;

public class ExampleModFabric implements ModInitializer {

@Override
public void onInitialize() {
ModConstructor.construct(ExampleMod.MOD_ID, ExampleMod::new);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package fuzs.examplemod.client;

import fuzs.examplemod.ExampleMod;
import fuzs.puzzleslib.api.client.core.v1.ClientModConstructor;
import net.fabricmc.api.ClientModInitializer;

public class ExampleModFabricClient implements ClientModInitializer {

@Override
public void onInitializeClient() {
ClientModConstructor.construct(ExampleMod.MOD_ID, ExampleModClient::new);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package fuzs.examplemod.mixin;

import net.fabricmc.loader.api.FabricLoader;
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;

import java.util.List;
import java.util.Set;

public class ModMixinConfigPlugin implements IMixinConfigPlugin {

@Override
public void onLoad(String mixinPackage) {

}

@Override
public String getRefMapperConfig() {
return null;
}

@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return FabricLoader.getInstance().isModLoaded("puzzleslib");
}

@Override
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {

}

@Override
public List<String> getMixins() {
return null;
}

@Override
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {

}

@Override
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {

}
}
15 changes: 15 additions & 0 deletions 1.18/Fabric/src/main/resources/examplemod.fabric.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"required": true,
"minVersion": "0.8",
"compatibilityLevel": "JAVA_17",
"package": "fuzs.examplemod.mixin",
"refmap": "examplemod.refmap.json",
"plugin": "fuzs.examplemod.mixin.ModMixinConfigPlugin",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}
45 changes: 45 additions & 0 deletions 1.18/Fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"schemaVersion": 1,
"id": "${modId}",
"version": "${modVersion}",

"name": "${modName}",
"description": "${modDescription}",

"authors": [
"${modAuthor}"
],

"contact": {
"homepage": "${modPageUrl}",
"issues": "${modIssueUrl}",
"sources": "${modPageUrl}"
},

"license": "${modLicense}",
"icon": "mod_logo.png",

"environment": "${modFabricEnvironment}",

"entrypoints": {
"main": [
"${mainEntryPoint}"
],
"client": [
"${clientEntryPoint}"
]
},

"mixins": [
"${modId}.common.mixins.json",
"${modId}.fabric.mixins.json"
],

"depends": {
"fabricloader": ">=${minFabricVersion}",
"fabric-api": ">=${minFabricApiVersion}",
"puzzleslib": ">=${minPuzzlesVersion}",
"minecraft": "${minecraftVersion}",
"java": ">=17"
}
}
28 changes: 28 additions & 0 deletions 1.18/Forge/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apply from: 'https://raw.githubusercontent.com/Fuzss/modresources/main/gradle/forge.gradle'

def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")

dependencies {
// Puzzles Lib
api fg.deobf(libs.puzzleslib.forge.get())

// Quality of Life Mods
versionCatalog.findLibrary("bettermodsbutton.forge").ifPresent {
runtimeOnly fg.deobf(it.get())
}
versionCatalog.findLibrary("forgeconfigscreens.forge").ifPresent {
runtimeOnly fg.deobf(it.get())
}
}

task signJar(type: net.minecraftforge.gradle.common.tasks.SignJar, dependsOn: tasks.reobfJarJar) {
onlyIf { project.hasProperty('keyStore') }
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = outputFile = tasks.jarJar.archivePath
}

jar.finalizedBy 'signJar'
signJar.mustRunAfter 'reobfJar'
Loading

0 comments on commit 65e550b

Please sign in to comment.