Skip to content

Commit

Permalink
fix datagen
Browse files Browse the repository at this point in the history
  • Loading branch information
ferriarnus committed Jan 13, 2024
1 parent a8f481b commit c0a3272
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 3 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ runs {
// workingDirectory project.file('run-data')

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll '--mod', 'regilite', 'examplemod', '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/test/resources/').getAbsolutePath()
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/test/resources/').getAbsolutePath()
}
}

sourceSets {
main
main {
java {}
}
test {
java {
compileClasspath += main.output
Expand All @@ -87,6 +89,7 @@ sourceSets.test.runs {
// Include resources generated by data generators.
sourceSets.test.resources { srcDir 'src/generated/resources' }


dependencies {
// Specify the version of Minecraft to use.
// Depending on the plugin applied there are several options. We will assume you applied the userdev plugin as shown above.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "examplemod:block/example_block"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "minecraft:block/water"
}
}
}
7 changes: 7 additions & 0 deletions src/generated/resources/assets/examplemod/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"block.examplemod.example_block": "Test Example Block",
"block.examplemod.example_fluid": "Example fluid",
"fluid_type.examplemod.example_fluid": "Example fluid",
"item.examplemod.example_item": "Test Example Item",
"itemGroup.examplemod.example_tab": "Example"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "examplemod:block/example_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "examplemod:item/example_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parent": "neoforge:item/bucket",
"fluid": "examplemod:fluid_example_fluid_still",
"loader": "neoforge:fluid_container"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "examplemod:item/example_item"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "examplemod:example_block"
}
],
"rolls": 1.0
}
],
"random_sequence": "examplemod:blocks/example_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minecraft:block",
"random_sequence": "examplemod:blocks/example_fluid"
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/minecraft/tags/blocks/logs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"examplemod:example_block"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"examplemod:example_block"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/minecraft/tags/items/planks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"examplemod:example_block"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/minecraft/tags/items/wool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"examplemod:example_item"
]
}
3 changes: 3 additions & 0 deletions src/main/java/com/example/regilite/Regilite.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.example.regilite;

import net.neoforged.fml.common.Mod;

@Mod(Regilite.MODID)
public class Regilite {
public static final String MODID = "regilite";
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="lowcodefml" #mandatory
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the the FML version. This is currently 47.
loaderVersion="${loader_version_range}" #mandatory
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
Expand Down

0 comments on commit c0a3272

Please sign in to comment.