Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
3f10881
Initial commit
Camotoy Mar 27, 2021
064184a
Fix package name
Camotoy Mar 27, 2021
be3bef4
Fix mixins
Camotoy Mar 27, 2021
312c59f
Final classes; implement join message
Camotoy Mar 28, 2021
71395ed
Commands now work
Camotoy Mar 29, 2021
01134d2
More proper player reloading
Camotoy Mar 29, 2021
c0ef59e
Missed com -> org change
Camotoy Mar 29, 2021
7fe0d95
It works.
Camotoy Apr 2, 2021
0a668eb
Add Jenkinsfile
Camotoy Apr 2, 2021
676ac62
It's tradition at this point for Jenkins to fail at least once
Camotoy Apr 2, 2021
15a1f36
Relocate Fastutil
Camotoy Apr 20, 2021
f0b292c
Create README.md
Camotoy Apr 25, 2021
84ddb0e
Null check player channel
Camotoy May 7, 2021
2720e0c
Text.of doesn't exist on the server?
Camotoy May 17, 2021
a0ceafe
Update to 1.17
Camotoy Jun 10, 2021
c9fd77f
Made Floodgate-Fabric build again
Tim203 Jul 5, 2021
defa438
Require 1.17.1 or greater
Camotoy Jul 16, 2021
8da7625
relocate google common
Konicai Jul 23, 2021
1bedce6
exclude gson and guava instead
Konicai Jul 23, 2021
478202e
whoops
Konicai Jul 23, 2021
8ca6995
Merge pull request #32 from Konicai/patch1
Camotoy Jul 23, 2021
af3abbd
Update to latest Floodgate changes
Camotoy Oct 8, 2021
8b9c6b8
Update for latest Floodgate usage
Camotoy Oct 18, 2021
39a519b
Update to latest Floodgate changes
Camotoy Dec 1, 2021
72be662
Update to Mojang mappings
Camotoy Dec 2, 2021
477096c
Update to 1.18
Camotoy Dec 2, 2021
7be0002
Update Jenkinsfile
Camotoy Dec 2, 2021
8579048
Remove mention of 2.0 Floodgate
Camotoy Dec 5, 2021
cbafcb4
Disable platform on shutdown (#40)
Gadget64 Dec 23, 2021
f7272e4
Update Floodgate-Fabric for 1.18.2
Camotoy Mar 5, 2022
986b8b5
Exclude slf4j (#46)
Gaming32 Mar 25, 2022
1fa1270
Attempt to fix building?
Camotoy Mar 25, 2022
3795a11
Remove maven that times out (#47)
sschr15 Apr 14, 2022
6c6a9e0
Update Adventure-Fabric for Fabric Loader compatibility
Camotoy May 5, 2022
dbbb2b2
Jenkinsfile: we don't use a Kotlin buildscript
Camotoy May 17, 2022
5d5864d
Jenkinsfile: wait why are we trying to deploy anyway?
Camotoy May 17, 2022
7482ac7
Update for 1.19
Camotoy Jun 14, 2022
d52b335
Fix linked player skins; clean up skin applying code
Camotoy Jun 16, 2022
61372d7
oops
Camotoy Jun 16, 2022
bb45676
Update to 1.19.3
Camotoy Dec 19, 2022
e223ae3
Apply additional Gradle changes from Konica
Camotoy Dec 19, 2022
232ccfa
I still cannot get this to compile locally. Attempt three.
Camotoy Dec 19, 2022
9fe1431
Floodgate-Fabric on 1.19.3 actually works
Camotoy Dec 19, 2022
b20e118
Unneeded import
Camotoy Dec 19, 2022
a1e9ff6
Should fix #73
Camotoy Dec 21, 2022
def43a4
FabricProxyLite support (#80)
onebeastchris Feb 12, 2023
1371eaf
Add PluginMessageModule and bind new FabricPluginMessageUtils (#82)
Konicai Feb 16, 2023
8b99d9e
relocate snakeyaml (#85)
onebeastchris Feb 28, 2023
661c172
fix injection failure issue (#87)
onebeastchris Mar 15, 2023
8b53939
Update gradle.properties (#88)
onebeastchris Mar 15, 2023
90bb7e4
Publish to Modrinth
Camotoy Mar 20, 2023
182e3e1
Change project ID
Camotoy Mar 20, 2023
a03f081
let's actually check for the right mixin (#90)
onebeastchris Apr 7, 2023
1fb0069
fix building & 1.20 support (#92)
onebeastchris Jun 8, 2023
fb38525
Avoid exception when running "floodgate" from console (#93)
onebeastchris Jun 8, 2023
31db6d0
add 1.20 version to modrinth (#96)
onebeastchris Jun 9, 2023
8869b57
Fix modrinth game versions (#97)
onebeastchris Jun 9, 2023
c7fcf10
Move to Java Edition 1.20.2 (#104)
Konicai Sep 29, 2023
1900da2
changed the filename. (#95)
piuvas Nov 1, 2023
5633bb8
Fix handshake mixin (#112)
onebeastchris Nov 19, 2023
160cc5e
Target 1.20.4 (#113)
Konicai Dec 15, 2023
046311d
Do not expect to always receive an instance of Channel in injector (#…
pompompopi Apr 27, 2024
f05ed8c
Update cloud to 2.0, update to Floodgate 2.2.3, support 1.20.5 (#115)
onebeastchris Apr 28, 2024
2680cb9
Update Jenkinsfile
Camotoy Apr 28, 2024
1277e3f
Update publish.yml to use java 21 (#119)
onebeastchris Apr 28, 2024
3d35cdb
Fix modrinth upload task (#120)
onebeastchris Apr 28, 2024
bf91d26
Add hacky mixin into ModInjector to ensure floodgate-fabric works wit…
onebeastchris May 1, 2024
3548ae5
Don't crash when switching local worlds (#123)
onebeastchris May 1, 2024
fdd816d
Resolve config loading issues (#124)
onebeastchris May 8, 2024
0e4ecb5
Update to 1.21
onebeastchris Jun 13, 2024
e587955
Show 1.21 being supported on modrinth
onebeastchris Jun 13, 2024
587717b
Yeet Jenkinsfile
onebeastchris Jun 13, 2024
b219b96
Add an .editorconfig (#121)
AlexProgrammerDE Jul 20, 2024
5c760a5
Fix: Reading of custom payloads (#128)
onebeastchris Jul 23, 2024
4502fd2
Back to mixin compatability level 17
onebeastchris Aug 8, 2024
0ef0659
Support neoforge platform, move to using architectury (#125)
onebeastchris Sep 10, 2024
65cd557
Fix: Annotated classes loading, fix floodgate-fabric mixin config plugin
onebeastchris Sep 11, 2024
e816246
Fix: Local linking jars not loading, AW remapping on neoforge (#136)
onebeastchris Sep 13, 2024
77adddc
temp fix for modrinth uploading
onebeastchris Sep 13, 2024
ec9a649
Ensure the modrinth file rename task is ran before trying to upload t…
onebeastchris Sep 13, 2024
c2fd9c7
indicate 1.21.2/.3 support
onebeastchris Oct 31, 2024
b094a1d
Avoid unclear disconnect messages when e.g. key verification failed
onebeastchris Nov 1, 2024
2d09b1d
port https://github.com/GeyserMC/Geyser/commit/47b68f8140d1f7816f28a2…
onebeastchris Nov 27, 2024
5cc2120
Bump cloud-minecraft-modded to beta10
onebeastchris Dec 2, 2024
6723ee7
Indicate 1.21.4 support on modrinth (#139)
onebeastchris Dec 6, 2024
6b41763
Update fabric.mod.json (#142)
eclipseisoffline Jan 9, 2025
5ba81a2
Indicate 1.21.5 support
onebeastchris Apr 21, 2025
9800802
Floodgate for 1.21.6 (#149)
eclipseisoffline Jun 26, 2025
7777f3a
Avoid using allprojects and subprojects blocks to decouple modules
onebeastchris Aug 27, 2025
c0c017b
Initial merge
onebeastchris Aug 27, 2025
febdafb
Start splitting into isolated / base modules and adapting to merge ch…
onebeastchris Aug 27, 2025
6660fca
Rough outline of isolation on modded platforms
onebeastchris Aug 27, 2025
bd3ad51
Couple more changes
onebeastchris Aug 28, 2025
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
max_line_length = off

[*.java]
ij_java_class_count_to_use_import_on_demand = 9999
ij_java_doc_align_exception_comments = false
ij_java_doc_align_param_comments = false
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# See https://github.com/actions/setup-java/commits
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Setup Gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# See https://github.com/actions/setup-java/commits
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Setup Gradle
Expand Down
5 changes: 5 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id("floodgate.publish-conventions")
id("floodgate.shadow-conventions")
}

dependencies {
api(libs.cumulus)
api(libs.events)
Expand Down
61 changes: 1 addition & 60 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,62 +1,3 @@
plugins {
`java-library`
alias(libs.plugins.micronaut) apply false
alias(libs.plugins.lombok) apply false
}

allprojects {
group = "org.geysermc.floodgate"
description = "Allows Bedrock players to join Java edition servers while keeping the server in online mode"

apply {
plugin("net.kyori.indra.git")
}

if (shouldAddBranchName()) {
version = versionWithBranchName()
}
}

//todo differentiate maven publishing from downloads publishing
val deployProjects = setOf(
projects.api,
projects.coreCommon,
projects.coreNetty4,
projects.isolation,
projects.bungee,
projects.spigot,
projects.velocity,
projects.bungeeBase,
projects.spigotBase,
projects.velocityBase,
projects.universal
).map { it.dependencyProject }

val shadowProjects = setOf(
projects.api,
projects.coreCommon,
projects.coreNetty4,
projects.bungeeBase,
projects.spigotBase,
projects.velocityBase,
projects.universal
).map { it.dependencyProject }

//todo re-add checkstyle when we switch back to 2 space indention
// and take a look again at spotbugs someday

subprojects {
apply {
plugin("java-library")
plugin("io.freefair.lombok")
}

when (this) {
in deployProjects -> plugins.apply("floodgate.publish-conventions")
else -> plugins.apply("floodgate.base-conventions")
}

if (this in shadowProjects) {
plugins.apply("floodgate.shadow-conventions")
}
id("floodgate.base-conventions")
}
13 changes: 13 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ plugins {

repositories {
gradlePluginPortal()
mavenCentral()
maven("https://maven.architectury.dev/")
maven("https://maven.fabricmc.net/")
maven("https://maven.neoforged.net/releases/")
}

dependencies {
// Used to access version catalogue from the convention plugins
// this is OK as long as the same version catalog is used in the main build and build-logic
// see https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(libs.lombok)
implementation(libs.micronaut)
implementation(libs.indra.common)
implementation(libs.indra.git)
implementation(libs.indra.licenser.spotless)
implementation(libs.shadow)
implementation(libs.gradle.idea.ext)
implementation(libs.architectury.plugin)
implementation(libs.architectury.loom)
//implementation(libs.minotaur) TODO modrinth publishing
}
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/LibsAccessor.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import org.gradle.api.Project
import org.gradle.kotlin.dsl.getByType
import org.gradle.accessors.dm.LibrariesForLibs

val Project.libs: LibrariesForLibs
get() = rootProject.extensions.getByType()
30 changes: 28 additions & 2 deletions buildSrc/src/main/kotlin/floodgate.base-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ plugins {
id("net.kyori.indra.git")
// id("net.kyori.indra.licenser.spotless")
id("floodgate.depsize")
id("io.freefair.lombok")
}

val rootProperties: Map<String, *> = project.rootProject.properties
group = rootProperties["group"] as String + "." + rootProperties["id"] as String
version = if (shouldAddBranchName()) versionWithBranchName() else rootProperties["version"] as String
description = rootProperties["description"] as String

dependencies {
compileOnly("org.checkerframework", "checker-qual", "3.19.0")
}
Expand Down Expand Up @@ -42,8 +48,28 @@ tasks {
"version" to fullVersion(),
"description" to project.description,
"url" to "https://geysermc.org",
"author" to "GeyserMC"
"author" to "GeyserMC",
"minecraft_version" to libs.versions.minecraft.version.get()
)
}
}
}
}

repositories {
mavenCentral()
maven("https://repo.opencollab.dev/main/")

maven("https://maven.fabricmc.net/")
maven("https://maven.neoforged.net/releases")
maven("https://repo.papermc.io/repository/maven-public")

// Spigot
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") {
mavenContent { snapshotsOnly() }
}

maven("https://libraries.minecraft.net") {
name = "minecraft"
mavenContent { releasesOnly() }
}
}
44 changes: 44 additions & 0 deletions buildSrc/src/main/kotlin/floodgate.modded-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id("floodgate.base-conventions")
id("floodgate.shadow-conventions")
id("architectury-plugin")
id("dev.architectury.loom")
}

configurations {
create("includeTransitive").isTransitive = true
create("shadowBundle") {
isCanBeResolved = true
isCanBeConsumed = false
isTransitive = false
}
}

architectury {
minecraft = libs.versions.minecraft.version.get()
}

loom {
silentMojangMappingsLicense()
}

indra {
javaVersions {
target(21)
}
}

tasks {
shadowJar {
// Mirrors the example fabric project, otherwise tons of dependencies are shaded that shouldn't be
configurations = listOf(project.configurations.getByName("shadowBundle"))
// The remapped shadowJar is the final desired mod jar
archiveVersion.set(project.version.toString())
archiveClassifier.set("shaded")
}
}

dependencies {
minecraft(libs.minecraft)
mappings(loom.officialMojangMappings())
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ plugins {
indra {
publishSnapshotsTo("geysermc", "https://repo.opencollab.dev/maven-snapshots")
publishReleasesTo("geysermc", "https://repo.opencollab.dev/maven-releases")
}
}

// TODO
//publishing {
// // skip shadow jar from publishing. Workaround for https://github.com/johnrengelman/shadow/issues/651
// val javaComponent = project.components["java"] as AdhocComponentWithVariants
// javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() }
//}
5 changes: 5 additions & 0 deletions bungee/base/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id("floodgate.shadow-conventions")
id("floodgate.publish-conventions")
}

dependencies {
api(projects.coreNetty4)
annotationProcessor(projects.coreNetty4)
Expand Down
2 changes: 1 addition & 1 deletion bungee/isolated/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
java
id("floodgate.base-conventions")
}

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id("floodgate.publish-conventions")
id("floodgate.generate-templates")
id("floodgate.dependency-hash")
id("floodgate.shadow-conventions")
id("io.micronaut.library")
}

Expand Down
5 changes: 5 additions & 0 deletions core/netty4/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id("floodgate.publish-conventions")
id("floodgate.shadow-conventions")
}

dependencies {
api(projects.coreCommon)
annotationProcessor(projects.coreCommon)
Expand Down
34 changes: 34 additions & 0 deletions fabric/base/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
plugins {
id("floodgate.modded-conventions")
}

architectury {
platformSetupLoomIde()
fabric()
}

// Used to extend runtime/compile classpaths
val common: Configuration by configurations.creating
// Needed to read mixin config in the runServer task, and for the architectury transformer
// (e.g. the @ExpectPlatform annotation)
val developmentFabric: Configuration = configurations.getByName("developmentFabric")
//// Our custom transitive include configuration
//val includeTransitive: Configuration = configurations.getByName("includeTransitive")

configurations {
compileClasspath.get().extendsFrom(configurations["common"])
runtimeClasspath.get().extendsFrom(configurations["common"])
developmentFabric.extendsFrom(configurations["common"])
}

dependencies {
modImplementation(libs.fabric.loader)
modApi(libs.fabric.api)
// "namedElements" configuration should be used to depend on different loom projects
common(project(":mod", configuration = "namedElements"))
// Bundle transformed classes of the common module for production mod jar
shadowBundle(project(path = ":mod", configuration = "transformProductionFabric"))
modImplementation(libs.cloud.fabric)

compileOnlyApi(projects.isolation)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.geysermc.floodgate.mod.util.fabric;

import net.fabricmc.loader.api.FabricLoader;

public class ModMixinConfigPluginImpl {

public static boolean applyProxyFix() {
return FabricLoader.getInstance().isModLoaded("fabricproxy-lite");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package org.geysermc.floodgate.platform.fabric;

import io.micronaut.context.ApplicationContext;
import io.micronaut.inject.qualifiers.Qualifiers;
import net.fabricmc.api.EnvType;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.kyori.adventure.platform.modcommon.MinecraftServerAudiences;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.floodgate.isolation.library.LibraryManager;
import org.geysermc.floodgate.mod.ModPlatform;

import java.nio.file.Path;

public final class FabricFloodgateMod extends ModPlatform {

private final ModContainer container;

public FabricFloodgateMod(LibraryManager manager, ModContainer container) {
super(manager);
this.container = container;
}

@Override
protected void onContextCreated(ApplicationContext context) {
super.onContextCreated(context);
context.registerSingleton(container)
.registerSingleton(
Path.class,
FabricLoader.getInstance().getConfigDir().resolve("floodgate"),
Qualifiers.byName("dataDirectory")
);

ServerLifecycleEvents.SERVER_STARTED.register((server) -> {
context.registerSingleton(server, false);
context.registerSingleton(MinecraftServerAudiences.of(server), false);
});
}

@Override
public @Nullable Path resourcePath(String file) {
return container.findPath(file).orElse(null);
}

@Override
public boolean isClient() {
return FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.geysermc.floodgate.platform.fabric.listener;

import net.fabricmc.fabric.api.networking.v1.ServerLoginConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import org.geysermc.floodgate.core.platform.listener.ListenerRegistration;
import org.geysermc.floodgate.mod.listener.ModEventListener;

public final class FabricEventRegistration implements ListenerRegistration<ModEventListener> {
@Override
public void register(ModEventListener listener) {
ServerPlayConnectionEvents.JOIN.register(
(handler, sender, server) -> listener.onPlayerJoin(handler.getPlayer().getUUID())
);
}
}
Loading
Loading