forked from sorceress/EasyAuth
More architect changes
This commit is contained in:
parent
bf77b712e4
commit
069e6869a1
|
@ -32,7 +32,7 @@ public class AuthEventHandler {
|
||||||
*
|
*
|
||||||
* @param profile GameProfile of the player
|
* @param profile GameProfile of the player
|
||||||
* @param manager PlayerManager
|
* @param manager PlayerManager
|
||||||
* @return TExt if player should be disconnected
|
* @return Text if player should be disconnected
|
||||||
*/
|
*/
|
||||||
public static LiteralText checkCanPlayerJoinServer(GameProfile profile, PlayerManager manager) {
|
public static LiteralText checkCanPlayerJoinServer(GameProfile profile, PlayerManager manager) {
|
||||||
// Getting the player
|
// Getting the player
|
||||||
|
|
|
@ -10,9 +10,6 @@ import net.minecraft.stat.ServerStatHandler;
|
||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
||||||
import org.samo_lego.simpleauth.event.entity.player.PlayerJoinServerCallback;
|
|
||||||
import org.samo_lego.simpleauth.event.entity.player.PlayerLeaveServerCallback;
|
|
||||||
import org.samo_lego.simpleauth.event.entity.player.PrePlayerJoinCallback;
|
|
||||||
import org.samo_lego.simpleauth.utils.PlayerAuth;
|
import org.samo_lego.simpleauth.utils.PlayerAuth;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.samo_lego.simpleauth.mixin;
|
package org.samo_lego.simpleauth.mixin;
|
||||||
|
|
||||||
import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket;
|
|
||||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||||
|
@ -8,9 +7,6 @@ import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
||||||
import org.samo_lego.simpleauth.event.entity.player.ChatCallback;
|
|
||||||
import org.samo_lego.simpleauth.event.entity.player.PlayerMoveCallback;
|
|
||||||
import org.samo_lego.simpleauth.event.item.TakeItemCallback;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.samo_lego.simpleauth.mixin;
|
package org.samo_lego.simpleauth.mixin;
|
||||||
|
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
@ -32,7 +31,7 @@ public class MixinServerPlayerEntity implements PlayerAuth {
|
||||||
// * 20 for 20 ticks in second
|
// * 20 for 20 ticks in second
|
||||||
private int kickTimer = config.main.kickTime * 20;
|
private int kickTimer = config.main.kickTime * 20;
|
||||||
|
|
||||||
private final boolean isRunningCarpet = FabricLoader.getInstance().isModLoaded("carpet");
|
private final boolean isRunningCarpet = false;//FabricLoader.getInstance().isModLoaded("carpet"); //todo
|
||||||
|
|
||||||
@Final
|
@Final
|
||||||
@Shadow
|
@Shadow
|
||||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
import org.samo_lego.simpleauth.event.AuthEventHandler;
|
||||||
import org.samo_lego.simpleauth.event.item.TakeItemCallback;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.samo_lego.simpleauth.utils;
|
package org.samo_lego.simpleauth.utils;
|
||||||
|
|
||||||
import carpet.patches.EntityPlayerMPFake;
|
//import carpet.patches.EntityPlayerMPFake;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
|
||||||
public class CarpetHelper {
|
public class CarpetHelper {
|
||||||
|
@ -12,6 +12,6 @@ public class CarpetHelper {
|
||||||
* @return true if it's fake, otherwise false
|
* @return true if it's fake, otherwise false
|
||||||
*/
|
*/
|
||||||
public static boolean isPlayerCarpetFake(PlayerEntity player) {
|
public static boolean isPlayerCarpetFake(PlayerEntity player) {
|
||||||
return player instanceof EntityPlayerMPFake;
|
return false;//player instanceof EntityPlayerMPFake;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
"MixinWorldSaveHandler",
|
"MixinWorldSaveHandler",
|
||||||
"ServerStatHandlerAccessor"
|
"ServerStatHandlerAccessor"
|
||||||
],
|
],
|
||||||
|
"minVersion": "0.8",
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,10 +41,10 @@ dependencies {
|
||||||
exclude(module: "fabric-api")
|
exclude(module: "fabric-api")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// carpetMod
|
// carpetMod
|
||||||
// from masa's maven
|
// from masa's maven
|
||||||
//modImplementation "carpet:fabric-carpet:${project.minecraft_version}-${project.carpet_core_version}"
|
//modImplementation "carpet:fabric-carpet:${project.minecraft_version}-${project.carpet_core_version}"
|
||||||
//modImplementation "carpet:fabric-carpet:1.16-${project.carpet_core_version}"
|
|
||||||
// jitpack for quicker updating
|
// jitpack for quicker updating
|
||||||
modImplementation "com.github.gnembon:fabric-carpet:${project.carpet_branch}-SNAPSHOT"
|
modImplementation "com.github.gnembon:fabric-carpet:${project.carpet_branch}-SNAPSHOT"
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,13 +13,15 @@ architectury {
|
||||||
loom {
|
loom {
|
||||||
// Enable this for yarn to work
|
// Enable this for yarn to work
|
||||||
//useFabricMixin = true
|
//useFabricMixin = true
|
||||||
mixinConfigs = ["simpleauth.mixins.json"]
|
mixinConfigs = ["mixins.simpleauth.json"]
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:${rootProject.architect.minecraft}")
|
minecraft("com.mojang:minecraft:${rootProject.architect.minecraft}")
|
||||||
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
|
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
|
||||||
forge("net.minecraftforge:forge:${rootProject.architect.minecraft}-${rootProject.forge_version}")
|
forge("net.minecraftforge:forge:${rootProject.architect.minecraft}-${rootProject.forge_version}")
|
||||||
|
// Remove the next line if you don't want to depend on the API
|
||||||
|
modCompile("me.shedaniel:architectury:${rootProject.architectury_version}:forge")
|
||||||
|
|
||||||
compileOnly(project(path: ":common")) {
|
compileOnly(project(path: ":common")) {
|
||||||
transitive = false
|
transitive = false
|
||||||
|
@ -48,7 +50,7 @@ remapJar {
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes([
|
attributes([
|
||||||
"MixinConfigs": "simpleauth.mixins.json",
|
"MixinConfigs": "mixins.simpleauth.json",
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@ bcrypt_version = 0.9.0
|
||||||
bytes_version = 1.3.0
|
bytes_version = 1.3.0
|
||||||
|
|
||||||
# Architectury
|
# Architectury
|
||||||
architectury_version=1.3.78
|
architectury_version=1.3.81
|
||||||
|
|
||||||
# Carpet for debugging
|
# Carpet for debugging
|
||||||
carpet_core_version = 1.4.16+v201105
|
carpet_core_version = 1.4.16+v201105
|
||||||
|
|
Loading…
Reference in New Issue