Skip to content

Commit

Permalink
Merge branch 'dev/1.21' into exp-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ferriarnus committed Jun 20, 2024
2 parents 45baae3 + 9baa464 commit be2e594
Show file tree
Hide file tree
Showing 3,452 changed files with 12,080 additions and 6,390 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h3 align="center">EnderIO</h3>

<p align="center">
The full-fat tech mod for Minecraft 1.20.1
The full-fat tech mod for Minecraft 1.21
<br />
<a href="https://github.com/SleepyTrousers/EnderIO-Rewrite/wiki"><strong>Browse the Wiki »</strong></a>
<br />
Expand Down Expand Up @@ -76,7 +76,7 @@ The Ender IO Team are official Akliz partners! Akliz provides high-performance g
| ----------------- | ------------------- | -------------- |
| < 1.20.1 | < 6.x ||
| 1.20.1 | 6.x | ✳️ |
| 1.20.6 | 7.x | 🚧 |
| 1.21 | 7.x | 🚧 |

- ❌ - Not Supported; no bug fixes or new features.
- 🚧 - Work in Progress; not ready for release.
Expand Down
48 changes: 36 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
id("eclipse")
id("maven-publish")
id("com.modrinth.minotaur") version "2.+"
id("net.neoforged.gradle.userdev") version "7.0.109"
id("net.neoforged.gradle.userdev") version "7.0.145"
id("com.hypherionmc.modutils.modpublisher") version "2.+"
}

Expand All @@ -24,6 +24,7 @@ val modrinth_projectId: String by project
val modrinth_dep_jei: String by project
val modrinth_dep_athena: String by project
val modrinth_dep_ae2: String by project
val cctVersion: String by project

idea {
module {
Expand Down Expand Up @@ -56,13 +57,18 @@ val subsets = listOf<String>(
)

sourceSets {
create("api")
create("ensure_plugin")
create("api") {
compileClasspath += sourceSets.getByName("ensure_plugin").output
}
create("core") {
compileClasspath += sourceSets.getByName("api").output
compileClasspath += sourceSets.getByName("ensure_plugin").output
}
main {
compileClasspath += sourceSets.getByName("api").output
compileClasspath += sourceSets.getByName("core").output
compileClasspath += sourceSets.getByName("ensure_plugin").output
//ext.refMap = "mixins.enderio.refmap.json"
resources.srcDir("src/generated/resources")
}
Expand Down Expand Up @@ -191,8 +197,7 @@ repositories {
exclusiveRepo("https://api.modrinth.com/maven", "maven.modrinth")
exclusiveRepo("https://maven.parchmentmc.org/", "org.parchmentmc.data")
exclusiveRepo("https://maven.rover656.dev/releases", "com.enderio")

mavenLocal()
exclusiveRepo("https://squiddev.cc/maven/", "cc.tweaked")
}

jarJar.enable()
Expand Down Expand Up @@ -231,10 +236,10 @@ dependencies {
annotationProcessor("org.spongepowered:mixin:0.8.5:processor")

// JEI
//compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
//compileOnly("mezz.jei:jei-${minecraft_version}-neoforge-api:${jei_version}")
//runtimeOnly("mezz.jei:jei-${minecraft_version}-common:${jei_version}")
//runtimeOnly("mezz.jei:jei-${minecraft_version}-neoforge:${jei_version}")
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
compileOnly("mezz.jei:jei-${minecraft_version}-neoforge-api:${jei_version}")
runtimeOnly("mezz.jei:jei-${minecraft_version}-common:${jei_version}")
runtimeOnly("mezz.jei:jei-${minecraft_version}-neoforge:${jei_version}")

//RFTOOLS
//runtimeOnly("maven.modrinth:rftools-power:f430rHkA")
Expand All @@ -243,7 +248,7 @@ dependencies {
//runtimeOnly("maven.modrinth:spark:Yp6s4wsw")

//Athena ctm
//runtimeOnly("maven.modrinth:athena-ctm:${athena_version}")
runtimeOnly("maven.modrinth:athena-ctm:${athena_version}")

// AE2
compileOnly("appeng:appliedenergistics2-neoforge:${ae2_version}:api")
Expand All @@ -262,7 +267,7 @@ dependencies {
//}

// Jade
//runtimeOnly("curse.maven:jade-324717:${jade_cf_id}")
runtimeOnly("curse.maven:jade-324717:${jade_cf_id}")

//fluxnetworks
////runtimeOnly("curse.maven:fluxnetworks-248020:4651164")
Expand All @@ -278,8 +283,13 @@ dependencies {
//runtimeOnly("vazkii.patchouli:Patchouli:${patchouli_version}")

// Mekanism
//compileOnly("mekanism:Mekanism:${minecraft_version}-${mekanism_version}:api")
//runtimeOnly("mekanism:Mekanism:${minecraft_version}-${mekanism_version}")
compileOnly("mekanism:Mekanism:${minecraft_version}-${mekanism_version}:api")
runtimeOnly("mekanism:Mekanism:${minecraft_version}-${mekanism_version}")

//CC-Tweaked
//compileOnly("cc.tweaked:cc-tweaked-$minecraft_version-core-api:$cctVersion")
//compileOnly("cc.tweaked:cc-tweaked-$minecraft_version-forge-api:$cctVersion")
//runtimeOnly("cc.tweaked:cc-tweaked-$minecraft_version-forge:$cctVersion")

// Jetbrains annotations
compileOnly("org.jetbrains:annotations:23.0.0")
Expand Down Expand Up @@ -430,6 +440,19 @@ publishing {

tasks.withType<JavaCompile> {
options.encoding = "UTF-8" // Use the UTF-8 charset for Java compilation
if (group != null) {
return@withType; // neoform recompile
}
if (name == "compileEnsure_pluginJava") {
//don't use the plugin to compile the plugin and open the required packages to compile it correctly, the packages are opened at compile time for other modules using EnsureSetup
options.compilerArgs.add("--add-exports=jdk.compiler/com.sun.tools.javac.api=ensureplugin")
options.compilerArgs.add("--add-exports=jdk.compiler/com.sun.tools.javac.code=ensureplugin")
options.compilerArgs.add("--add-exports=jdk.compiler/com.sun.tools.javac.tree=ensureplugin")
options.compilerArgs.add("--add-exports=jdk.compiler/com.sun.tools.javac.util=ensureplugin")
} else if (name != "compileJava") {
//all modules except an unnamed one (not sure what this one is tbh)
options.compilerArgs.add("-Xplugin:ContextEnsure")
}
}

// ============
Expand Down Expand Up @@ -549,6 +572,7 @@ fun setupSourceSet(name: String) {
sourceSet.compileClasspath += sourceSets.getByName("api").output
sourceSet.compileClasspath += sourceSets.main.get().output
sourceSet.compileClasspath += sourceSets.getByName("core").output
sourceSet.compileClasspath += sourceSets.getByName("ensure_plugin").output

// Extend configurations
setupExtraSourceSets(sourceSet)
Expand Down
3 changes: 3 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
</module>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
</module>
25 changes: 13 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

# Minecraft and Forge
minecraft_version=1.20.6
neo_version=20.6.72-beta
minecraft_version=1.21
neo_version=21.0.20-beta

# Version ranges for mods.toml
minecraft_version_range=[1.20.6,1.21)
minecraft_version_range=[1.21,1.22)
loader_version_range=[1,)
neo_version_range=[20.6,)
neo_version_range=[21.0.14-beta,)

# Mappings
neogradle.subsystems.parchment.minecraftVersion=1.20.4
neogradle.subsystems.parchment.mappingsVersion=2024.04.14
neogradle.subsystems.parchment.minecraftVersion=1.20.6
neogradle.subsystems.parchment.mappingsVersion=2024.05.01

# Dependencies
regilite_version=1.20.6-0.0.3-alpha
jei_version=17.3.0.49
regilite_version=1.21-0.0.4-alpha
jei_version=19.0.0.7

graphlib_version=3.0.4
graphlib_version_range=[3.0.4,)
ae2_version=18.1.1-alpha
athena_version=EwkHR2YR
ae2_version=19.0.4-alpha
athena_version=TbNOQ4qu
#top_version=5.0.0
top_version=1.20.0-10.0.0
patchouli_version=1.20.4-85
mekanism_version=10.5.0.22
jade_cf_id=5109393
mekanism_version=10.6.1.45
jade_cf_id=5444008
ench_desc_version=20.0.1
bookshelf_version=23.0.4
almostunified_version=0.6.0
cctVersion=1.111.0

# ===========================
# Combined Project Properties
Expand Down
3 changes: 1 addition & 2 deletions src/api/java/com/enderio/api/UseOnly.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.enderio.api;

import net.neoforged.fml.LogicalSide;
import net.neoforged.fml.util.thread.EffectiveSide;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
* Marks a method or field to only be used on a side without using the {@link net.neoforged.api.distmarker.OnlyIn} Annotation
* Todo: Maybe do some bytecode magic to add a check before each invocation of this method to {@link EffectiveSide#get()} and log a warning and print a stacktrace
* This is only a documentation thing, to add a runtime check you can use {@link me.liliandev.ensure.ensures.EnsureSide}
*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
public @interface UseOnly {
Expand Down
4 changes: 2 additions & 2 deletions src/api/java/com/enderio/api/attachment/StoredEntityData.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public boolean hasEntity() {

public Optional<ResourceLocation> entityType() {
if (entityTag.contains(KEY_ID)) {
return Optional.of(new ResourceLocation(entityTag.getString(KEY_ID)));
return Optional.of(ResourceLocation.parse(entityTag.getString(KEY_ID)));
}

return Optional.empty();
Expand All @@ -92,7 +92,7 @@ public Optional<Tuple<Float, Float>> getHealthState() {
private static final Logger LOGGER = LogUtils.getLogger();

public Tag save(HolderLookup.Provider lookupProvider) {
if (this.hasEntity()) {
if (!this.hasEntity()) {
throw new IllegalStateException("Cannot encode empty StoredEntityData");
} else {
return CODEC.encodeStart(lookupProvider.createSerializationContext(NbtOps.INSTANCE), this).getOrThrow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public enum CapacitorModifier implements StringRepresentable {

CapacitorModifier(int id) {
this.id = id;
this.modifierId = new ResourceLocation("enderio", "capacitor." + name().toLowerCase(Locale.ROOT));
this.modifierId = ResourceLocation.fromNamespaceAndPath("enderio", "capacitor." + name().toLowerCase(Locale.ROOT));
}

@Override
Expand Down
96 changes: 0 additions & 96 deletions src/api/java/com/enderio/api/conduit/ClientConduitData.java

This file was deleted.

10 changes: 10 additions & 0 deletions src/api/java/com/enderio/api/conduit/ColoredRedstoneProvider.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.enderio.api.conduit;

import com.enderio.api.misc.ColorControl;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;

@FunctionalInterface
public interface ColoredRedstoneProvider {
boolean isRedstoneActive(ServerLevel serverLevel, BlockPos pos, ColorControl color);
}
Loading

0 comments on commit be2e594

Please sign in to comment.