fix a bunch of errors and have to wait for architectury api version 20 or something that will support 26.1 since i am currently getting Expected offical namespace for access widener entry, found: intermadiary in mod: architectury-19.0.1.jar
Some checks failed
Build and Artifact / build (pull_request) Has been cancelled
Some checks failed
Build and Artifact / build (pull_request) Has been cancelled
This commit is contained in:
17
build.gradle
17
build.gradle
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id 'dev.architectury.loom' version '1.13.467' apply false
|
||||
id 'architectury-plugin' version '3.4.162'
|
||||
id 'dev.architectury.loom-no-remap' version '1.14-SNAPSHOT' apply false
|
||||
id 'architectury-plugin' version '3.5-SNAPSHOT'
|
||||
id 'com.gradleup.shadow' version '8.3.6' apply false
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ allprojects {
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'dev.architectury.loom'
|
||||
apply plugin: 'dev.architectury.loom-no-remap'
|
||||
apply plugin: 'architectury-plugin'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
@@ -31,13 +31,8 @@ subprojects {
|
||||
// for more information about repositories.
|
||||
}
|
||||
|
||||
loom {
|
||||
silentMojangMappingsLicense()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
|
||||
mappings loom.officialMojangMappings()
|
||||
}
|
||||
|
||||
java {
|
||||
@@ -46,12 +41,12 @@ subprojects {
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
sourceCompatibility = JavaVersion.VERSION_25
|
||||
targetCompatibility = JavaVersion.VERSION_25
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
it.options.release = 25
|
||||
}
|
||||
|
||||
// Configure Maven publishing.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
architectury {
|
||||
common rootProject.enabled_platforms.split(',')
|
||||
common rootProject.enabled_platforms.toString().split(',')
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
resources {
|
||||
@@ -15,8 +14,8 @@ dependencies {
|
||||
// We depend on Fabric Loader here to use the Fabric @Environment annotations,
|
||||
// which get remapped to the correct annotations on each platform.
|
||||
// Do NOT use other classes from Fabric Loader.
|
||||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
implementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
|
||||
// Architectury API. This is optional, and you can comment it out if you don't need it.
|
||||
modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"
|
||||
api "dev.architectury:architectury:$rootProject.architectury_api_version"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/spear_in_hand",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_spear_in_hand"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_cake"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_cake"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"key": {
|
||||
"E": "nuggetmod:raw_nugget",
|
||||
"M": "nuggetmod:nugget_block",
|
||||
"S": "minecraft:sugar",
|
||||
"W": "nuggetmod:nugget"
|
||||
},
|
||||
"pattern": [
|
||||
"MMM",
|
||||
"SES",
|
||||
"WWW"
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_cake"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 12,
|
||||
"size": 9,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 14
|
||||
"count": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
|
||||
@@ -3,6 +3,7 @@ package dev.sillyangel.nuggetmod.block;
|
||||
import dev.architectury.registry.registries.DeferredRegister;
|
||||
import dev.architectury.registry.registries.RegistrySupplier;
|
||||
import dev.sillyangel.nuggetmod.NuggetMod;
|
||||
import net.minecraft.world.level.block.CakeBlock;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.DropExperienceBlock;
|
||||
@@ -20,6 +21,12 @@ public class ModBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(NuggetMod.MOD_ID, Registries.BLOCK);
|
||||
public static final DeferredRegister<Item> BLOCK_ITEMS = DeferredRegister.create(NuggetMod.MOD_ID, Registries.ITEM);
|
||||
|
||||
public static final RegistrySupplier<Block> NUGGET_CAKE = registerBlockWithItem("nugget_cake",
|
||||
() -> new CakeBlock(createBlockSettings("nugget_cake")
|
||||
.strength(0.5f)
|
||||
.forceSolidOn()
|
||||
.sound(SoundType.WOOL)));
|
||||
|
||||
public static final RegistrySupplier<Block> NUGGET_BLOCK = registerBlockWithItem("nugget_block",
|
||||
() -> new Block(createBlockSettings("nugget_block")
|
||||
.strength(4f)
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ModItemGroups {
|
||||
entries.accept(ModItems.NUGGET_SMITHING_TEMPLATE.get());
|
||||
entries.accept(ModItems.NUGGET_MUSIC_DISC.get());
|
||||
|
||||
entries.accept(ModItems.NUGGET_CAKE.get());
|
||||
entries.accept(ModBlocks.NUGGET_CAKE.get());
|
||||
}).build());
|
||||
|
||||
public static void init() {
|
||||
|
||||
@@ -17,9 +17,6 @@ public class ModItems {
|
||||
public static final RegistrySupplier<Item> NUGGET = ITEMS.register("nugget",
|
||||
() -> new Item(createSettings("nugget").food(ModFoodComponents.NUGGET)));
|
||||
|
||||
public static final RegistrySupplier<Item> NUGGET_CAKE = ITEMS.register("nugget_cake",
|
||||
() -> new Item(createSettings("nugget_cake")));
|
||||
|
||||
public static final RegistrySupplier<Item> RAW_NUGGET = ITEMS.register("raw_nugget",
|
||||
() -> new Item(createSettings("raw_nugget")));
|
||||
|
||||
|
||||
@@ -18,40 +18,52 @@ configurations {
|
||||
|
||||
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||
shadowBundle {
|
||||
shadowCommon {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
|
||||
apiElements {
|
||||
outgoing.artifacts.clear()
|
||||
outgoing.artifact(shadowJar)
|
||||
}
|
||||
runtimeElements {
|
||||
outgoing.artifacts.clear()
|
||||
outgoing.artifact(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
api "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version"
|
||||
api "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version"
|
||||
|
||||
// Architectury API. This is optional, and you can comment it out if you don't need it.
|
||||
modImplementation "dev.architectury:architectury-fabric:$rootProject.architectury_api_version"
|
||||
api "dev.architectury:architectury-fabric:$rootProject.architectury_api_version"
|
||||
|
||||
common(project(path: ':common', configuration: 'namedElements')) { transitive = false }
|
||||
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
|
||||
common(project(path: ':common')) { transitive = false }
|
||||
shadowCommon project(path: ':common', configuration: 'transformProductionFabric')
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property 'version', project.version
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching('fabric.mod.json') {
|
||||
expand version: inputs.properties.version
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": inputs.properties.version
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = 'dev-shadow'
|
||||
jar {
|
||||
archiveClassifier = "raw"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set shadowJar.archiveFile
|
||||
shadowJar {
|
||||
dependsOn(jar)
|
||||
from(zipTree(jar.archiveFile))
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
archiveClassifier = null
|
||||
from rootProject.file("LICENSE.md")
|
||||
}
|
||||
|
||||
fabricApi {
|
||||
|
||||
@@ -21,6 +21,7 @@ public class ModModelProvider extends FabricModelProvider {
|
||||
blockStateModelGenerator.createTrivialCube(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
blockStateModelGenerator.createTrivialCube(ModBlocks.NUGGET_ORE.get());
|
||||
blockStateModelGenerator.createTrivialCube(ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
// blockStateModelGenerator.blockStateOutput.accept();
|
||||
}
|
||||
// Items are generated here
|
||||
@Override
|
||||
|
||||
@@ -51,14 +51,14 @@ public class ModRecipeProvider extends FabricRecipeProvider {
|
||||
.save(recipeExporter);
|
||||
|
||||
// cake is a lie
|
||||
shaped(RecipeCategory.FOOD, ModItems.NUGGET_CAKE.get())
|
||||
shaped(RecipeCategory.FOOD, ModBlocks.NUGGET_CAKE.get())
|
||||
.pattern("MMM")
|
||||
.pattern("SES")
|
||||
.pattern("WWW")
|
||||
.define('M', ModBlocks.NUGGET_BLOCK.get())
|
||||
.define('S', Items.SUGAR)
|
||||
.define('E', ModItems.RAW_NUGGET)
|
||||
.define('W', ModItems.NUGGET)
|
||||
.define('E', ModItems.RAW_NUGGET.get())
|
||||
.define('W', ModItems.NUGGET.get())
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get()))
|
||||
.save(output);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Done to increase the memory available to Gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.daemon=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Mod properties
|
||||
@@ -9,10 +10,10 @@ archives_name = nuggetmod
|
||||
enabled_platforms = fabric,neoforge
|
||||
|
||||
# Minecraft properties
|
||||
minecraft_version = 1.21.11
|
||||
minecraft_version = 26.1
|
||||
|
||||
# Dependencies
|
||||
architectury_api_version = 19.0.1
|
||||
fabric_loader_version = 0.18.4
|
||||
fabric_api_version = 0.140.2+1.21.11
|
||||
neoforge_version = 21.11.17-beta
|
||||
fabric_loader_version = 0.18.5
|
||||
fabric_api_version = 0.144.3+26.1
|
||||
neoforge_version = 26.1.0.5-beta
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
13
gradlew
vendored
13
gradlew
vendored
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -112,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -170,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -203,15 +203,14 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
5
gradlew.bat
vendored
5
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -68,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -18,10 +18,19 @@ configurations {
|
||||
|
||||
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||
shadowBundle {
|
||||
shadowCommon {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
|
||||
apiElements {
|
||||
outgoing.artifacts.clear()
|
||||
outgoing.artifact(shadowJar)
|
||||
}
|
||||
runtimeElements {
|
||||
outgoing.artifacts.clear()
|
||||
outgoing.artifact(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -35,10 +44,10 @@ dependencies {
|
||||
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
|
||||
|
||||
// Architectury API. This is optional, and you can comment it out if you don't need it.
|
||||
modImplementation "dev.architectury:architectury-neoforge:$rootProject.architectury_api_version"
|
||||
api "dev.architectury:architectury-neoforge:$rootProject.architectury_api_version"
|
||||
|
||||
common(project(path: ':common', configuration: 'namedElements')) { transitive = false }
|
||||
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||
common(project(path: ':common')) { transitive = false }
|
||||
shadowCommon project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -49,11 +58,14 @@ processResources {
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = 'dev-shadow'
|
||||
jar {
|
||||
archiveClassifier = "raw"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set shadowJar.archiveFile
|
||||
shadowJar {
|
||||
dependsOn(jar)
|
||||
from(zipTree(jar.archiveFile))
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
archiveClassifier = null
|
||||
from rootProject.file("LICENSE.md")
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ public class ModItemGroups {
|
||||
entries.accept(ModItems.NUGGET_HORSE_ARMOR.get());
|
||||
entries.accept(ModItems.NUGGET_SMITHING_TEMPLATE.get());
|
||||
entries.accept(ModItems.NUGGET_MUSIC_DISC.get());
|
||||
|
||||
entries.accept(ModBlocks.NUGGET_CAKE.get());
|
||||
}).build());
|
||||
|
||||
public static void registerItemGroups(IEventBus eventBus) {
|
||||
|
||||
@@ -2,7 +2,7 @@ pluginManagement {
|
||||
repositories {
|
||||
maven { url = 'https://maven.fabricmc.net/' }
|
||||
maven { url = 'https://maven.architectury.dev/' }
|
||||
maven { url = 'https://files.minecraftforge.net/maven/' }
|
||||
maven { url = 'https://maven.neoforged.net/releases/' }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user