-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to multiloader (Xplat + Forge) project, no Fabric yet
- Loading branch information
1 parent
373eee3
commit 513d410
Showing
28 changed files
with
221 additions
and
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Thumbs.db | |
|
||
## gradle | ||
/.gradle | ||
/build | ||
build/ | ||
|
||
## ForgeGradle | ||
/run | ||
|
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,84 @@ | ||
buildscript { | ||
repositories { | ||
maven { url = 'https://maven.minecraftforge.net' } | ||
maven { | ||
url = 'https://repo.spongepowered.org/repository/maven-public/' | ||
content { includeGroup "org.spongepowered" } | ||
} | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true | ||
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' | ||
} | ||
} | ||
|
||
apply plugin: 'net.minecraftforge.gradle' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'org.spongepowered.mixin' | ||
|
||
version = "${project.neat_version}-${project.build_number}" | ||
|
||
mixin { | ||
add sourceSets.main, "neat.refmap.json" | ||
config "neat.mixins.json" | ||
} | ||
|
||
minecraft { | ||
mappings channel: "official", version: "${project.mc_version}" | ||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | ||
|
||
runs { | ||
client { | ||
workingDirectory project.file('../run') | ||
property 'forge.logging.console.level', 'debug' | ||
ideaModule "${rootProject.name}.${project.name}.main" | ||
|
||
mods { | ||
neat { | ||
source sourceSets.main | ||
source project(":Xplat").sourceSets.main | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}" | ||
compileOnly project(":Xplat") | ||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' | ||
} | ||
|
||
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/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' |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
public net.minecraft.client.renderer.RenderType$CompositeRenderType |
File renamed without changes.
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 @@ | ||
plugins { | ||
id('java') | ||
id('org.spongepowered.gradle.vanilla') version '0.2.1-SNAPSHOT' | ||
} | ||
|
||
archivesBaseName = "${project.mod_name}-xplat" | ||
version = "${project.neat_version}-${project.build_number}" | ||
|
||
minecraft { | ||
version(project.mc_version) | ||
accessWideners 'src/main/resources/neat_xplat.accesswidener' | ||
} | ||
|
||
dependencies { | ||
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5' | ||
implementation "com.google.code.findbugs:jsr305:3.0.2" | ||
} |
File renamed without changes.
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,37 @@ | ||
package vazkii.neat; | ||
|
||
import java.util.List; | ||
|
||
public class NeatConfig { | ||
|
||
public static final String MOD_ID = "neat"; | ||
public static boolean draw = true; | ||
|
||
public interface ConfigAccess { | ||
int maxDistance(); | ||
boolean renderInF1(); | ||
double heightAbove(); | ||
boolean drawBackground(); | ||
int backgroundPadding(); | ||
int backgroundHeight(); | ||
int barHeight(); | ||
int plateSize(); | ||
int plateSizeBoss(); | ||
boolean showAttributes(); | ||
boolean showArmor(); | ||
boolean groupArmor(); | ||
boolean colorByType(); | ||
int hpTextHeight(); | ||
boolean showMaxHP(); | ||
boolean showCurrentHP(); | ||
boolean showPercentage(); | ||
boolean showOnPlayers(); | ||
boolean showOnBosses(); | ||
boolean showOnlyFocused(); | ||
boolean showFullHealth(); | ||
boolean enableDebugInfo(); | ||
List<String> blacklist(); | ||
} | ||
|
||
public static ConfigAccess instance; | ||
} |
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
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
Xplat/src/main/java/vazkii/neat/mixin/AccessorRenderType.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,16 @@ | ||
package vazkii.neat.mixin; | ||
|
||
import com.mojang.blaze3d.vertex.VertexFormat; | ||
|
||
import net.minecraft.client.renderer.RenderType; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(RenderType.class) | ||
public interface AccessorRenderType { | ||
@Invoker("create") | ||
static RenderType.CompositeRenderType neat_create(String name, VertexFormat format, VertexFormat.Mode mode, int bufSize, boolean affectsCrumbling, boolean sortOnUpload, RenderType.CompositeState glState) { | ||
throw new IllegalStateException(""); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"mixins": [ | ||
], | ||
"client": [ | ||
"AccessorRenderType", | ||
"EntityRenderDispatcherMixin" | ||
], | ||
"injectors": { | ||
|
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 @@ | ||
accessWidener v1 named | ||
# NOTE: These are access wideners needed by Xplat code. | ||
# They must be duplicated in the loader-specific projects' AT/AW as well if not already done so by the loader. | ||
accessible class net/minecraft/client/renderer/RenderType$CompositeRenderType | ||
accessible class net/minecraft/client/renderer/RenderType$CompositeState |
File renamed without changes.
Oops, something went wrong.