-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fabric test mod works. Forge one still needs work
- Loading branch information
1 parent
f000c74
commit 4c491f3
Showing
21 changed files
with
256 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
org.gradle.jvmargs=-Xmx2048M | ||
|
||
minecraft_version=1.18 | ||
minecraft_version=1.18.1 | ||
|
||
version = 1.0.0 | ||
version = 1.1.0 | ||
archives_base_name = matrix | ||
group = "org.dimdev" | ||
|
||
architectury_version=3.6.15 | ||
|
||
fabric_loader_version=0.13.0 | ||
fabric_loader_version=0.13.2 | ||
fabric_api_version=0.46.4+1.18 | ||
|
||
forge_version=1.18-38.0.17 | ||
forge_version=1.18.1-39.0.75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
dependencies { | ||
// We depend on fabric loader here to use the fabric @Environment annotations | ||
// Do NOT use other classes from fabric loader | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" | ||
modApi "dev.architectury:architectury:${rootProject.architectury_version}" | ||
implementation project(":common") | ||
} | ||
|
||
architectury { | ||
common() | ||
} |
14 changes: 14 additions & 0 deletions
14
testmod-common/src/main/java/org/dimdev/matrix/test/ModBlocks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.dimdev.matrix.test; | ||
|
||
import dev.architectury.registry.block.BlockProperties; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraft.world.level.block.state.BlockBehaviour; | ||
import org.dimdev.matrix.Registrar; | ||
import org.dimdev.matrix.RegistryEntry; | ||
|
||
@Registrar(element = Block.class, modid = "matrix-test") | ||
public class ModBlocks { | ||
@RegistryEntry("test_block") | ||
public static final Block BLOCK = new Block(BlockBehaviour.Properties.copy(Blocks.DIRT)); | ||
} |
14 changes: 14 additions & 0 deletions
14
testmod-common/src/main/java/org/dimdev/matrix/test/ModItems.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.dimdev.matrix.test; | ||
|
||
import net.minecraft.world.item.BlockItem; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
import net.minecraft.world.item.Item; | ||
import org.dimdev.matrix.Registrar; | ||
import org.dimdev.matrix.RegistryEntry; | ||
|
||
|
||
@Registrar(element = Item.class, modid = "matrix-test") | ||
public class ModItems { | ||
@RegistryEntry("test_item") | ||
public static final Item ITEM = new BlockItem(ModBlocks.BLOCK, new Item.Properties().tab(CreativeModeTab.TAB_FOOD)); | ||
} |
13 changes: 13 additions & 0 deletions
13
testmod-common/src/main/java/org/dimdev/matrix/test/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.dimdev.matrix.test; | ||
|
||
import net.minecraft.core.Registry; | ||
import org.dimdev.matrix.Matrix; | ||
|
||
public class Test { | ||
public static final String MOD_ID = "matrix_test"; | ||
|
||
public static void init() { | ||
Matrix.register(ModBlocks.class, Registry.BLOCK_REGISTRY); | ||
Matrix.register(ModItems.class, Registry.ITEM_REGISTRY); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
testmod-common/src/main/resources/assets/architectury_test/lang/en_us.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"category.architectury_test": "Architectury Test", | ||
"key.architectury_test.test": "Test Keybind" | ||
} |
Binary file added
BIN
+898 Bytes
...src/main/resources/assets/architectury_test/textures/particle/test_particle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
testmod-common/src/main/resources/data/architectury_test/tags/blocks/heart_particles2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:emerald_block" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.0.0" | ||
} | ||
|
||
loom { | ||
mixin { useLegacyMixinAp = true } | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
fabric() | ||
} | ||
|
||
configurations { | ||
common | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentFabric.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" | ||
modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}" | ||
|
||
implementation project(path: ":fabric", configuration: "namedElements") | ||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
common(project(path: ":testmod-common", configuration: "namedElements")) { transitive false } | ||
} |
5 changes: 5 additions & 0 deletions
5
testmod-fabric/src/main/resources/assets/architectury_test/particles/test_particle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"textures": [ | ||
"architectury_test:test_particle" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "matrix_test", | ||
"version": "${version}", | ||
"name": "Architectury Test", | ||
"description": "A intermediary api aimed to ease developing multiplatform mods.", | ||
"authors": [ | ||
"shedaniel" | ||
], | ||
"license": "LGPL-3", | ||
"environment": "*", | ||
"entrypoints": { | ||
"main": [ | ||
"org.dimdev.matrix.test.Test::init" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.0.0" | ||
} | ||
|
||
loom { | ||
forge { | ||
mixinConfig "architectury.mixins.json" | ||
|
||
localMods { | ||
forge { | ||
it.add(project(":forge").sourceSets.main) | ||
} | ||
} | ||
} | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
forge() | ||
} | ||
|
||
configurations { | ||
common | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentForge.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
forge "net.minecraftforge:forge:${gradle.rootProject.forge_version}" | ||
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}" | ||
|
||
implementation project(path: ":forge", configuration: "namedElements") | ||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
common(project(path: ":testmod-common", configuration: "namedElements")) { transitive false } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loom.platform=forge |
14 changes: 14 additions & 0 deletions
14
testmod-forge/src/main/java/dev/architectury/test/forge/TestModForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dev.architectury.test.forge; | ||
|
||
import dev.architectury.platform.forge.EventBuses; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; | ||
import org.dimdev.matrix.test.Test; | ||
|
||
@Mod(Test.MOD_ID) | ||
public class TestModForge { | ||
public TestModForge() { | ||
EventBuses.registerModEventBus(Test.MOD_ID, FMLJavaModLoadingContext.get().getModEventBus()); | ||
Test.init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
modLoader = "javafml" | ||
loaderVersion = "[33,)" | ||
issueTrackerURL = "https://github.com/shedaniel/architectury/issues" | ||
license = "LGPL-3" | ||
|
||
[[mods]] | ||
modId = "matrix_test" | ||
version = "${file.jarVersion}" | ||
displayName = "Architectury Test" | ||
authors = "shedaniel" | ||
description = ''' | ||
A intermediary api aimed to ease developing multiplatform mods. | ||
''' | ||
license = "LGPL-3" |
2 changes: 2 additions & 0 deletions
2
testmod-forge/src/main/resources/assets/architectury_test/particles/test_particle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"pack": { | ||
"description": "Architectury Test", | ||
"pack_format": 6 | ||
} | ||
} |