Refactor package and cleanup dependencies for Fabric

This commit is contained in:
SupremeMortal 2022-10-17 22:08:52 +01:00
parent 6ad7889cbb
commit 237a69d3c2
No known key found for this signature in database
GPG key ID: DDBB25F8EE4FA29A
19 changed files with 52 additions and 67 deletions

View file

@ -10,23 +10,14 @@ java {
sourceCompatibility = JavaVersion.VERSION_17
}
//archivesBaseName = project.archives_base_name
//version = project.mod_version
//group = project.maven_group
val minecraftVersion = project.property("minecraft_version") as String
val yarnVersion = project.property("yarn_mappings") as String
val loaderVersion = project.property("loader_version") as String
val fabricVersion = project.property("fabric_version") as String
dependencies {
//to change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:$minecraftVersion")
mappings("net.fabricmc:yarn:$yarnVersion:v2")
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
minecraft(libs.fabric.minecraft)
mappings(libs.fabric.yarn) { artifact { classifier = "v2" } }
modImplementation(libs.fabric.loader)
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricVersion")
modImplementation(libs.fabric.api)
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
@ -51,7 +42,7 @@ repositories {
}
application {
mainClass.set("org.geysermc.platform.fabric.GeyserFabricMain")
mainClass.set("org.geysermc.geyser.platform.fabric.GeyserFabricMain")
}
tasks {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import com.fasterxml.jackson.annotation.JsonIgnore;
import net.fabricmc.loader.api.FabricLoader;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import net.fabricmc.api.EnvType;
import net.fabricmc.loader.api.FabricLoader;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View file

@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import org.geysermc.geyser.GeyserMain;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.fabricmc.api.EnvType;
@ -49,9 +49,9 @@ import org.geysermc.geyser.configuration.GeyserConfiguration;
import org.geysermc.geyser.level.WorldManager;
import org.geysermc.geyser.ping.IGeyserPingPassthrough;
import org.geysermc.geyser.util.FileUtils;
import org.geysermc.platform.fabric.command.GeyserFabricCommandExecutor;
import org.geysermc.platform.fabric.command.GeyserFabricCommandManager;
import org.geysermc.platform.fabric.world.GeyserFabricWorldManager;
import org.geysermc.geyser.platform.fabric.command.GeyserFabricCommandExecutor;
import org.geysermc.geyser.platform.fabric.command.GeyserFabricCommandManager;
import org.geysermc.geyser.platform.fabric.world.GeyserFabricWorldManager;
import org.jetbrains.annotations.Nullable;
import java.io.File;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import net.minecraft.server.MinecraftServer;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric;
package org.geysermc.geyser.platform.fabric;
import net.fabricmc.loader.api.ModContainer;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,15 +23,15 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.command;
package org.geysermc.geyser.platform.fabric.command;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.command.GeyserCommandSource;
import org.geysermc.geyser.platform.fabric.GeyserFabricMod;
import org.geysermc.geyser.text.ChatColor;
import org.geysermc.platform.fabric.GeyserFabricMod;
public class FabricCommandSender implements GeyserCommandSource {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.command;
package org.geysermc.geyser.platform.fabric.command;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.context.CommandContext;
@ -31,11 +31,11 @@ import net.minecraft.server.command.ServerCommandSource;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.command.GeyserCommand;
import org.geysermc.geyser.command.GeyserCommandExecutor;
import org.geysermc.geyser.platform.fabric.GeyserFabricMod;
import org.geysermc.geyser.platform.fabric.GeyserFabricPermissions;
import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.text.ChatColor;
import org.geysermc.geyser.text.GeyserLocale;
import org.geysermc.platform.fabric.GeyserFabricMod;
import org.geysermc.platform.fabric.GeyserFabricPermissions;
import java.util.Collections;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.command;
package org.geysermc.geyser.platform.fabric.command;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.command.GeyserCommandManager;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.mixin.client;
package org.geysermc.geyser.platform.fabric.mixin.client;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@ -32,9 +32,9 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.integrated.IntegratedServer;
import net.minecraft.text.Text;
import net.minecraft.world.GameMode;
import org.geysermc.geyser.platform.fabric.GeyserFabricMod;
import org.geysermc.geyser.platform.fabric.GeyserServerPortGetter;
import org.geysermc.geyser.text.GeyserLocale;
import org.geysermc.platform.fabric.GeyserFabricMod;
import org.geysermc.platform.fabric.GeyserServerPortGetter;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.mixin.server;
package org.geysermc.geyser.platform.fabric.mixin.server;
import com.mojang.datafixers.DataFixer;
import net.minecraft.resource.ResourcePackManager;
@ -33,7 +33,7 @@ import net.minecraft.server.WorldGenerationProgressListenerFactory;
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
import net.minecraft.util.ApiServices;
import net.minecraft.world.level.storage.LevelStorage;
import org.geysermc.platform.fabric.GeyserServerPortGetter;
import org.geysermc.geyser.platform.fabric.GeyserServerPortGetter;
import org.spongepowered.asm.mixin.Mixin;
import java.net.Proxy;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.platform.fabric.world;
package org.geysermc.geyser.platform.fabric.world;
import com.nukkitx.math.vector.Vector3i;
import com.nukkitx.nbt.NbtMap;
@ -39,11 +39,11 @@ import net.minecraft.nbt.NbtList;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import org.geysermc.geyser.level.GeyserWorldManager;
import org.geysermc.geyser.platform.fabric.GeyserFabricMod;
import org.geysermc.geyser.platform.fabric.command.GeyserFabricCommandExecutor;
import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.translator.inventory.LecternInventoryTranslator;
import org.geysermc.geyser.util.BlockEntityUtils;
import org.geysermc.platform.fabric.GeyserFabricMod;
import org.geysermc.platform.fabric.command.GeyserFabricCommandExecutor;
import java.util.ArrayList;
import java.util.List;

View file

@ -16,7 +16,7 @@
"environment": "*",
"entrypoints": {
"main": [
"org.geysermc.platform.fabric.GeyserFabricMod"
"org.geysermc.geyser.platform.fabric.GeyserFabricMod"
]
},
"mixins": [

View file

@ -1,6 +1,6 @@
{
"required": true,
"package": "org.geysermc.platform.fabric.mixin",
"package": "org.geysermc.geyser.platform.fabric.mixin",
"compatibilityLevel": "JAVA_16",
"client": [
"client.IntegratedServerMixin"

View file

@ -9,16 +9,4 @@ version=2.1.0-SNAPSHOT
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.vfs.watch=false
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.1
yarn_mappings=1.19.1+build.1
loader_version=0.14.8
# Mod Properties
maven_group=org.geysermc.platform
archives_base_name=Geyser-Fabric
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.58.5+1.19.1
org.gradle.vfs.watch=false

View file

@ -62,6 +62,12 @@ jline-reader = { group = "org.jline", name = "jline-reader", version.ref = "jlin
paper-api = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" }
paper-mojangapi = { group = "io.papermc.paper", name = "paper-mojangapi", version.ref = "paper" }
# check these on https://modmuss50.me/fabric.html
fabric-minecraft = { group = "com.mojang", name = "minecraft", version = "1.19.1" }
fabric-yarn = { group = "net.fabricmc", name = "yarn", version = "1.19.1+build.1" }
fabric-loader = { group = "net.fabricmc", name = "fabric-loader", version = "0.14.8" }
fabric-api = { group = "net.fabricmc.fabric-api", name = "fabric-api", version = "0.58.5+1.19.1" }
adapters-spigot = { group = "org.geysermc.geyser.adapters", name = "spigot-all", version.ref = "adapters" }
bungeecord-proxy = { group = "com.github.SpigotMC.BungeeCord", name = "bungeecord-proxy", version.ref = "bungeecord" }
checker-qual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerframework" }