diff --git a/common/src/main/java/org/samo_lego/simpleauth/event/AuthEventHandler.java b/common/src/main/java/org/samo_lego/simpleauth/event/AuthEventHandler.java index 7e1ca6c..fc60a7b 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/event/AuthEventHandler.java +++ b/common/src/main/java/org/samo_lego/simpleauth/event/AuthEventHandler.java @@ -32,7 +32,7 @@ public class AuthEventHandler { * * @param profile GameProfile of the player * @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) { // Getting the player diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinPlayerManager.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinPlayerManager.java index d0837ab..9c0dda9 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinPlayerManager.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinPlayerManager.java @@ -10,9 +10,6 @@ import net.minecraft.stat.ServerStatHandler; import net.minecraft.text.LiteralText; import net.minecraft.text.Text; 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.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java index 7525342..6901442 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java @@ -1,6 +1,5 @@ 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.PlayerActionC2SPacket; 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.util.ActionResult; 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.Shadow; import org.spongepowered.asm.mixin.injection.At; diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayerEntity.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayerEntity.java index 3a6aa3c..b871b2a 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayerEntity.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayerEntity.java @@ -1,6 +1,5 @@ package org.samo_lego.simpleauth.mixin; -import net.fabricmc.loader.api.FabricLoader; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayerEntity; @@ -32,7 +31,7 @@ public class MixinServerPlayerEntity implements PlayerAuth { // * 20 for 20 ticks in second 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 @Shadow diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java index 2d3ffe5..2fad4df 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java @@ -6,7 +6,6 @@ import net.minecraft.screen.slot.Slot; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.ActionResult; 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.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/common/src/main/java/org/samo_lego/simpleauth/utils/CarpetHelper.java b/common/src/main/java/org/samo_lego/simpleauth/utils/CarpetHelper.java index cb43bd8..8f74364 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/utils/CarpetHelper.java +++ b/common/src/main/java/org/samo_lego/simpleauth/utils/CarpetHelper.java @@ -1,6 +1,6 @@ package org.samo_lego.simpleauth.utils; -import carpet.patches.EntityPlayerMPFake; +//import carpet.patches.EntityPlayerMPFake; import net.minecraft.entity.player.PlayerEntity; public class CarpetHelper { @@ -12,6 +12,6 @@ public class CarpetHelper { * @return true if it's fake, otherwise false */ public static boolean isPlayerCarpetFake(PlayerEntity player) { - return player instanceof EntityPlayerMPFake; + return false;//player instanceof EntityPlayerMPFake; } } diff --git a/common/src/main/resources/mixins.simpleauth.json b/common/src/main/resources/mixins.simpleauth.json index 0713648..d62843d 100644 --- a/common/src/main/resources/mixins.simpleauth.json +++ b/common/src/main/resources/mixins.simpleauth.json @@ -14,6 +14,7 @@ "MixinWorldSaveHandler", "ServerStatHandlerAccessor" ], + "minVersion": "0.8", "injectors": { "defaultRequire": 1 } diff --git a/fabric/build.gradle b/fabric/build.gradle index f4ab495..b442b14 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -41,10 +41,10 @@ dependencies { exclude(module: "fabric-api") } + // carpetMod // from masa's maven //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 modImplementation "com.github.gnembon:fabric-carpet:${project.carpet_branch}-SNAPSHOT" } diff --git a/forge/build.gradle b/forge/build.gradle index 7eb945b..717fb1a 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -13,13 +13,15 @@ architectury { loom { // Enable this for yarn to work //useFabricMixin = true - mixinConfigs = ["simpleauth.mixins.json"] + mixinConfigs = ["mixins.simpleauth.json"] } dependencies { minecraft("com.mojang:minecraft:${rootProject.architect.minecraft}") mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2") 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")) { transitive = false @@ -48,7 +50,7 @@ remapJar { jar { manifest { attributes([ - "MixinConfigs": "simpleauth.mixins.json", + "MixinConfigs": "mixins.simpleauth.json", ]) } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 86a285d..68847b8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ bcrypt_version = 0.9.0 bytes_version = 1.3.0 # Architectury -architectury_version=1.3.78 +architectury_version=1.3.81 # Carpet for debugging carpet_core_version = 1.4.16+v201105