Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #23

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Dev #23

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.1]

### Changed
* Updated to support KubeJS 2100.7.0 on Neoforge

## [3.2.0]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ publishMods {

// TODO: Migrate to something else
def tag = providers.environmentVariable("TAG").getOrElse("release")
type = tag == "beta" ? BETA : (tag == "alpha" ? ALPHA : STABLE)
type = tag.endsWith("-beta") ? BETA : (tag.endsWith("-alpha") ? ALPHA : STABLE)

def createOptions = (String projectName) -> {
publishOptions {
Expand Down
2 changes: 0 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ dependencies {
modCompileOnly("mezz.jei:jei-${rootProject.minecraft_version}-common-api:${rootProject.jei_version}")

compileOnly("net.luckperms:api:${rootProject.luckperms_api_version}")

modCompileOnlyApi "dev.latvian.mods:kubejs-neoforge:${rootProject.kubejs_version}"
}

publishing {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.ftb.mods.ftbxmodcompat.generic.gamestages;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.ftb.mods.ftblibrary.integration.stages.StageHelper;
import dev.ftb.mods.ftbxmodcompat.FTBXModCompat;
import dev.ftb.mods.ftbxmodcompat.config.FTBXModConfig;
Expand All @@ -14,18 +15,24 @@ public static void init() {
}

switch (sel) {
case KUBEJS -> StageHelper.getInstance().setProviderImpl(new KubeJSStageProvider());
case KUBEJS -> addKubeJSProvider();
case GAMESTAGES -> StageHelper.getInstance().setProviderImpl(new GameStagesStageProvider());
case VANILLA -> { /* do nothing, this is the fallback */ }
case DEFAULT -> {
if (FTBXModCompat.isKubeJSLoaded) {
StageHelper.getInstance().setProviderImpl(new KubeJSStageProvider());
// TODO: nothing for now, neither KJS nor Gamestages have a working stages implementation yet on 1.21
/* if (FTBXModCompat.isKubeJSLoaded) {
addKubeJSProvider();
} else if (FTBXModCompat.isGameStagesLoaded) {
StageHelper.getInstance().setProviderImpl(new GameStagesStageProvider());
}
}*/
}
}

FTBXModCompat.LOGGER.info("Chose [{}] as the active game stages implementation", StageHelper.getInstance().getProvider().getName());
}

@ExpectPlatform
public static void addKubeJSProvider() {
throw new AssertionError();
}
}
3 changes: 0 additions & 3 deletions common/src/main/resources/kubejs.classfilter.txt

This file was deleted.

4 changes: 0 additions & 4 deletions common/src/main/resources/kubejs.plugins.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dev.ftb.mods.ftbxmodcompat.generic.gamestages.fabric;

public class StagesSetupImpl {
public static void addKubeJSProvider() {
throw new IllegalStateException("KubeJS stages only supported on Neoforge!");
}
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ enabled_platforms=fabric,neoforge

archives_base_name=ftb-xmod-compat
readable_name=FTB XMod Compat
mod_version=3.2.0
mod_version=3.2.1
maven_group=dev.ftb.mods
curseforge_id=889915

forge_version=50.0.9
neoforge_version=21.0.14-beta
neoforge_version=21.0.43-beta
neoforge_loader_version=4
fabric_loader_version=0.15.11
fabric_api_version=0.100.1+1.21

architectury_version=13.0.1
architectury_version=13.0.2

ftb_library_version=2100.1.1
ftb_library_version=2100.1.2
ftb_quests_version=2100.1.1
ftb_chunks_version=2100.1.0
ftb_ranks_version=2100.1.0
Expand All @@ -36,7 +36,7 @@ balm_neoforge_version=5438018
balm_forge_version=5438000
balm_fabric_version=5437997
jei_version=19.0.0.11
kubejs_version=2100.7.0-build.56

# TODO compiling against 1.20.4 version for now
kubejs_version=2004.7.0-build.16
gamestages_version=15.0.1
5 changes: 3 additions & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ dependencies {
modApi("dev.ftb.mods:ftb-ranks-neoforge:${rootProject.ftb_ranks_version}")
modApi("dev.ftb.mods:ftb-essentials-neoforge:${rootProject.ftb_essentials_version}")
modApi("dev.ftb.mods:ftb-teams-neoforge:${rootProject.ftb_teams_version}")
modApi("dev.ftb.mods:ftb-filter-system-neoforge:${rootProject.ftb_filter_system_version}")

modCompileOnlyApi("me.shedaniel:RoughlyEnoughItems-neoforge:${rootProject.rei_version}")
compileOnly("net.luckperms:api:${rootProject.luckperms_api_version}")

modApi("dev.latvian.mods:kubejs-neoforge:${rootProject.kubejs_version}")

// TODO below here is compile-only for now
modCompileOnlyApi("net.darkhax.gamestages:GameStages-Forge-1.20.1:${rootProject.gamestages_version}") { transitive false }

modCompileOnly("dev.latvian.mods:kubejs-neoforge:${rootProject.kubejs_version}")
modCompileOnly("curse.maven:balm-531761:${balm_neoforge_version}")
modCompileOnly("curse.maven:waystones-245755:${waystones_neoforge_version}")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package dev.ftb.mods.ftbxmodcompat.generic.gamestages.neoforge;

import dev.ftb.mods.ftblibrary.integration.stages.StageProvider;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;

public class KubeJSStageProvider implements StageProvider {
@Override
public boolean has(Player player, String stage) {
return false;
// return Stages.get(player).has(stage);
}

@Override
public void add(ServerPlayer player, String stage) {
// Stages.get(player).add(stage);
}

@Override
public void remove(ServerPlayer player, String stage) {
// Stages.get(player).remove(stage);
}

@Override
public void sync(ServerPlayer player) {
// Stages.get(player).sync();
}

@Override
public String getName() {
return "KubeJS Stages (non-functional!)";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package dev.ftb.mods.ftbxmodcompat.generic.gamestages.neoforge;

import dev.ftb.mods.ftblibrary.integration.stages.StageHelper;
import dev.ftb.mods.ftbxmodcompat.FTBXModCompat;

public class StagesSetupImpl {
public static void addKubeJSProvider() {
FTBXModCompat.LOGGER.warn("KubeJS gamestages are not functional on 1.21 yet!");
StageHelper.getInstance().setProviderImpl(new KubeJSStageProvider());
}
}
Loading
Loading