-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port to 1.21 and changed forge to neoforge
- Loading branch information
Showing
16 changed files
with
189 additions
and
185 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'idea' | ||
id 'net.neoforged.gradle.userdev' | ||
id 'eclipse' | ||
} | ||
|
||
version = "${project.mc_version}-${project.build_number}-NEOFORGE" | ||
|
||
def accesstransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | ||
if (accesstransformer.exists()) { | ||
minecraft.accessTransformers.file accesstransformer | ||
} | ||
|
||
runs { | ||
configureEach { | ||
workingDirectory project.file('../run') | ||
systemProperty 'forge.logging.console.level', 'debug' | ||
modSource project.sourceSets.main | ||
} | ||
|
||
client { | ||
} | ||
|
||
server { | ||
programArgument '--nogui' | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "net.neoforged:neoforge:${neoforge_version}" | ||
implementation project(":Xplat") | ||
} | ||
|
||
compileJava { | ||
source(project(":Xplat").sourceSets.main.allSource) | ||
options.compilerArgs << "-Xlint:all,-classfile,-processing,-deprecation,-serial" << "-Werror" | ||
} | ||
|
||
sourcesJar { | ||
from project(":Xplat").sourceSets.main.allJava | ||
} | ||
|
||
processResources { | ||
from project(":Xplat").sourceSets.main.resources | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/neoforge.mods.toml") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes([ | ||
"Specification-Title": "${project.mod_id}", | ||
"Specification-Vendor": "vazkii", | ||
"Specification-Version": "1", // We are version 1 of ourselves | ||
"Implementation-Title": "${project.mod_id}", | ||
"Implementation-Version": "${project.version}", | ||
"Implementation-Vendor" :"vazkii", | ||
]) | ||
} | ||
} | ||
|
||
defaultTasks 'clean', 'build' |
65 changes: 33 additions & 32 deletions
65
...ain/java/vazkii/neat/NeatForgeConfig.java → ...ain/java/vazkii/neat/NeatForgeConfig.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
27 changes: 27 additions & 0 deletions
27
NeoForge/src/main/java/vazkii/neat/NeatForgeInitializer.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,27 @@ | ||
package vazkii.neat; | ||
|
||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.ModContainer; | ||
import net.neoforged.fml.ModLoadingContext; | ||
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; | ||
import net.neoforged.api.distmarker.Dist; | ||
import net.neoforged.fml.common.EventBusSubscriber; | ||
import net.neoforged.fml.common.Mod; | ||
|
||
@Mod(NeatConfig.MOD_ID) | ||
public class NeatForgeInitializer { | ||
|
||
public NeatForgeInitializer(IEventBus bus, ModContainer modContainer) { | ||
//ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (incoming, isNetwork) -> true)); | ||
NeatForgeConfig.init(modContainer); | ||
} | ||
|
||
@EventBusSubscriber(modid = NeatConfig.MOD_ID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) | ||
public static class ClientEventHandler { | ||
@SubscribeEvent | ||
public static void registerKey(RegisterKeyMappingsEvent event) { | ||
event.register(ToggleKeybind.KEY); | ||
} | ||
} | ||
} |
File renamed without changes.
13 changes: 8 additions & 5 deletions
13
Forge/src/main/resources/META-INF/mods.toml → ...ain/resources/META-INF/neoforge.mods.toml
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,16 +1,19 @@ | ||
modLoader="javafml" | ||
loaderVersion="[45,)" | ||
loaderVersion="[4,)" | ||
issueTrackerURL="https://github.com/VazkiiMods/Neat" | ||
license="MIT AND CC-BY-NC-SA-3.0" # Code is MIT, assets are CC | ||
|
||
[[mods]] | ||
modId="neat" | ||
displayName="Neat" | ||
version="${version}" | ||
authors="Vazkii" | ||
authors="Vazkii, Uraneptus" | ||
description="Minimalistic Functional Unit Plates for the modern Minecrafter" | ||
|
||
[[dependencies.neat]] | ||
modId="forge" | ||
mandatory=true | ||
versionRange="[45.0.40,)" | ||
modId="neoforge" | ||
type="required" | ||
versionRange="[21.0.143,)" | ||
|
||
[[mixins]] | ||
config="neat.mixins.json" |
Oops, something went wrong.