Skip to content

Commit 36aceb1

Browse files
committed
Me when I the
1 parent dc2c3f2 commit 36aceb1

File tree

8 files changed

+107
-199
lines changed

8 files changed

+107
-199
lines changed

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"jdk.naming.dns/com.sun.jndi.dns\u003djava.naming",
4747
"-Dforge.logging.markers\u003dREGISTRIES",
4848
"-Dforge.logging.console.level\u003ddebug",
49-
"-Dforge.enabledGameTestNamespaces\u003drubinated_nether",
49+
"-Dneoforge.enabledGameTestNamespaces\u003drubinated_nether",
5050
"-Dneoforge.enableGameTest\u003dtrue",
5151
"-DlegacyClassPath.file\u003d/var/home/ultrasquid/Documents/Github/RubinatedNether/.gradle/configuration/neoForm/neoFormJoined1.21.1-20240808.144430/steps/writeMinecraftClasspathClient/classpath.txt",
5252
"-DignoreList\u003dsecurejarhandler-3.0.8.jar,asm-9.7.jar,asm-commons-9.7.jar,asm-tree-9.7.jar,asm-util-9.7.jar,asm-analysis-9.7.jar,bootstraplauncher-2.0.2.jar,JarJarFileSystems-0.4.1.jar,mixinextras-neoforge-0.4.1.jar,client-extra,neoforge-",

build.gradle

+59-81
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
plugins {
2-
id 'java-library'
3-
id 'eclipse'
4-
id 'idea'
5-
id 'maven-publish'
6-
id 'net.neoforged.gradle.userdev' version '7.0.170'
2+
id 'java-library'
3+
id 'maven-publish'
4+
id 'io.github.0ffz.github-packages' version '[1,2)'
5+
id 'net.neoforged.moddev' version '1.0.23'
76
}
87

98
tasks.named('wrapper', Wrapper).configure {
10-
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
11-
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
12-
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
13-
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
14-
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
159
distributionType = Wrapper.DistributionType.BIN
1610
}
1711

@@ -25,73 +19,61 @@ repositories {
2519
url = "https://api.modrinth.com/maven"
2620
}
2721
maven {
28-
url = "https://modmaven.dev"
29-
}
22+
url = "https://modmaven.dev"
23+
}
3024
}
3125

3226
base {
3327
archivesName = mod_id
3428
}
3529

36-
// Mojang ships Java 21 to end users starting in 1.20.5, so mods should target Java 21.
3730
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
3831

39-
//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
40-
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
41-
42-
// Default run configurations.
43-
// These can be tweaked, removed, or duplicated as needed.
44-
runs {
45-
// applies to all the run configs below
46-
configureEach {
47-
// Recommended logging data for a userdev environment
48-
// The markers can be added/remove as needed separated by commas.
49-
// "SCAN": For mods scan.
50-
// "REGISTRIES": For firing of registry events.
51-
// "REGISTRYDUMP": For getting the contents of all registries.
52-
systemProperty 'forge.logging.markers', 'REGISTRIES'
53-
54-
// Recommended logging level for the console
55-
// You can set various levels here.
56-
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
57-
systemProperty 'forge.logging.console.level', 'debug'
58-
59-
modSource project.sourceSets.main
60-
}
32+
neoForge {
33+
version = project.neo_version
6134

62-
client {
63-
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
64-
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
35+
parchment {
36+
mappingsVersion = project.parchment_mappings_version
37+
minecraftVersion = project.parchment_minecraft_version
6538
}
6639

67-
server {
68-
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
69-
programArgument '--nogui'
70-
}
40+
runs {
41+
client {
42+
client()
43+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
44+
}
7145

72-
// This run config launches GameTestServer and runs all registered gametests, then exits.
73-
// By default, the server will crash when no gametests are provided.
74-
// The gametest system is also enabled by default for other run configs under the /test command.
75-
gameTestServer {
76-
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
77-
}
46+
server {
47+
server()
48+
programArgument '--nogui'
49+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
50+
}
7851

79-
data {
80-
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
81-
// workingDirectory project.file('run-data')
52+
gameTestServer {
53+
type = "gameTestServer"
54+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
55+
}
8256

83-
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
84-
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
57+
data {
58+
data()
59+
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
60+
}
61+
62+
configureEach {
63+
systemProperty 'forge.logging.markers', 'REGISTRIES'
64+
logLevel = org.slf4j.event.Level.DEBUG
65+
}
66+
}
67+
68+
mods {
69+
"${mod_id}" {
70+
sourceSet(sourceSets.main)
71+
}
8572
}
8673
}
8774

88-
// Include resources generated by data generators.
8975
sourceSets.main.resources { srcDir 'src/generated/resources' }
9076

91-
// Sets up a dependency configuration called 'localRuntime'.
92-
// This configuration should be used instead of 'runtimeOnly' to declare
93-
// a dependency that will be present for runtime testing but that is
94-
// "optional", meaning it will not be pulled by dependents of this mod.
9577
configurations {
9678
runtimeClasspath.extendsFrom localRuntime
9779
}
@@ -111,31 +93,28 @@ dependencies {
11193
jarJar ("maven.modrinth:midnightlib:${project.midnightlib_version}")
11294
}
11395

114-
// This block of code expands all declared replace properties in the specified resource targets.
115-
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
116-
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
117-
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
118-
tasks.withType(ProcessResources).configureEach {
96+
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
11997
var replaceProperties = [
120-
minecraft_version : minecraft_version,
121-
minecraft_version_range : minecraft_version_range,
122-
neo_version : neo_version,
123-
neo_version_range : neo_version_range,
124-
loader_version_range : loader_version_range,
125-
midnightlib_version : midnightlib_version,
126-
mod_id : mod_id,
127-
mod_name : mod_name,
128-
mod_license : mod_license,
129-
mod_version : mod_version,
130-
mod_authors : mod_authors,
131-
mod_description : mod_description
98+
minecraft_version : minecraft_version,
99+
minecraft_version_range : minecraft_version_range,
100+
neo_version : neo_version,
101+
neo_version_range : neo_version_range,
102+
loader_version_range : loader_version_range,
103+
midnightlib_version : midnightlib_version,
104+
mod_id : mod_id,
105+
mod_name : mod_name,
106+
mod_license : mod_license,
107+
mod_version : mod_version,
108+
mod_authors : mod_authors,
109+
mod_description : mod_description
132110
]
133111
inputs.properties replaceProperties
134-
135-
filesMatching(['META-INF/neoforge.mods.toml']) {
136-
expand replaceProperties
137-
}
112+
expand replaceProperties
113+
from "src/main/templates"
114+
into "build/generated/sources/modMetadata"
138115
}
116+
sourceSets.main.resources.srcDir generateModMetadata
117+
neoForge.ideSyncTask generateModMetadata
139118

140119
// Example configuration to allow publishing using the maven-publish plugin
141120
publishing {
@@ -152,10 +131,9 @@ publishing {
152131
}
153132

154133
tasks.withType(JavaCompile).configureEach {
155-
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
134+
options.encoding = 'UTF-8'
156135
}
157136

158-
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
159137
idea {
160138
module {
161139
downloadSources = true

gradle.properties

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
21
org.gradle.jvmargs=-Xmx1G
3-
org.gradle.daemon=false
4-
org.gradle.debug=false
5-
6-
#read more on this at https://github.com/neoforged/NeoGradle/blob/NG_7.0/README.md#apply-parchment-mappings
7-
# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started
8-
neogradle.subsystems.parchment.minecraftVersion=1.21.1
9-
neogradle.subsystems.parchment.mappingsVersion=2024.11.17
2+
org.gradle.daemon=true
3+
org.gradle.parallel=true
4+
org.gradle.caching=true
5+
org.gradle.configuration-cache=true
106

7+
parchment_minecraft_version=1.21.1
8+
parchment_mappings_version=2024.11.17
119
minecraft_version=1.21.1
12-
minecraft_version_range=[1.21.1,1.22)
13-
neo_version=21.1.83
10+
minecraft_version_range=[1.21.1, 1.22)
11+
neo_version=21.1.85
1412
neo_version_range=[21.1.0,)
1513
loader_version_range=[4,)
1614

15+
1716
midnightlib_version = 1.6.3-neoforge
1817
jei_version=19.21.0.247
1918

src/main/java/corundum/rubinated_nether/content/blocks/RunestoneBlock.java

+2-11
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public class RunestoneBlock extends Block {
3535

3636
public static final EnumProperty<DoubleBlockHalf> HALF = BlockStateProperties.DOUBLE_BLOCK_HALF;
3737

38-
// protected static final VoxelShape SHAPE_BOTTOM = Block.box(0.0, 0.0, 0.0, 16.0, 10.0, 16.0);
39-
// protected static final VoxelShape SHAPE_MIDDLE = Block.box(1.0, 10.0, 1.0, 15.0, 16.0, 15.0);
40-
// protected static final VoxelShape SHAPE_TOP = Block.box(0.0, 24.0, 0.0, 16.0, 32.0, 16.0);
41-
4238
protected static final VoxelShape SHAPE_TOP = Shapes.or(Block.box(1.0, 0.0, 1.0, 15.0, 8.0, 15.0), Block.box(0.0, 8.0, 0.0, 16.0, 16.0, 16.0));
4339
protected static final VoxelShape SHAPE_BOTTOM = Shapes.or(Block.box(0.0, 0.0, 0.0, 16.0, 10.0, 16.0), Block.box(1.0, 10.0, 1.0, 15.0, 16.0, 15.0));
4440

@@ -89,13 +85,8 @@ protected BlockState updateShape(BlockState state, Direction facing, BlockState
8985

9086
@Override
9187
public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) {
92-
if (!level.isClientSide && (player.isCreative() || !player.hasCorrectToolForDrops(state, level, pos))) {
93-
DoublePlantBlockAccessor.invokePreventDropFromBottomPart(level, pos, state, player);
94-
// }
95-
// else {
96-
// dropResources(state, level, pos, null, player, player.getMainHandItem());
97-
// }
98-
}
88+
if (!level.isClientSide && (player.isCreative() || !player.hasCorrectToolForDrops(state, level, pos)))
89+
DoublePlantBlockAccessor.invokePreventDropFromBottomPart(level, pos, state, player);
9990

10091
return super.playerWillDestroy(level, pos, state, player);
10192
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
public net.minecraft.world.level.block.DoublePlantBlock preventDropFromBottomPart(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/entity/player/Player;)V # preventDropFromBottomPart
2-
public net.minecraft.world.level.Level getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter;

src/main/resources/META-INF/neoforge.mods.toml

-94
This file was deleted.

src/main/resources/icon.png

24 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
modLoader="javafml"
2+
loaderVersion="${loader_version_range}"
3+
license="${mod_license}"
4+
5+
[[mods]]
6+
7+
modId="${mod_id}"
8+
version="${mod_version}"
9+
displayName="${mod_name}"
10+
logoFile="icon.png"
11+
authors="${mod_authors}"
12+
description='''${mod_description}'''
13+
14+
# Complex things
15+
enumExtensions = "META-INF/enumextensions.json"
16+
17+
[[mixins]]
18+
config="${mod_id}.mixins.json"
19+
20+
[[accessTransformers]]
21+
file="META-INF/accesstransformer.cfg"
22+
23+
# Dependencies
24+
[[dependencies.rubinated_nether]]
25+
modId="neoforge"
26+
type="required"
27+
versionRange="${neo_version_range}"
28+
ordering="NONE"
29+
side="BOTH"
30+
31+
[[dependencies.rubinated_nether]]
32+
modId="minecraft"
33+
type="required"
34+
versionRange="${minecraft_version_range}"
35+
ordering="NONE"
36+
side="BOTH"

0 commit comments

Comments
 (0)