mirror of
https://github.com/JonasunderscoreJones/YetAnotherDiscordChatLink.git
synced 2025-10-23 00:39:17 +02:00
Port to 1.19.x
This commit is contained in:
parent
48761085c4
commit
53349761a8
3 changed files with 6 additions and 7 deletions
|
@ -4,9 +4,9 @@ org.gradle.parallel=true
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.20.2
|
minecraft_version=1.19.4
|
||||||
yarn_mappings=1.20.2+build.1
|
yarn_mappings=1.19.4+build.2
|
||||||
loader_version=0.14.22
|
loader_version=0.14.23
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.0.0
|
mod_version=0.0.0
|
||||||
|
@ -14,4 +14,4 @@ maven_group=dev.jonasjones
|
||||||
archives_base_name=yet-another-discord-chat-link
|
archives_base_name=yet-another-discord-chat-link
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.89.1+1.20.2
|
fabric_version=0.87.1+1.19.4
|
||||||
|
|
|
@ -3,7 +3,6 @@ package dev.jonasjones.yadcl.mixin;
|
||||||
import dev.jonasjones.yadcl.config.ModConfigs;
|
import dev.jonasjones.yadcl.config.ModConfigs;
|
||||||
import net.minecraft.network.ClientConnection;
|
import net.minecraft.network.ClientConnection;
|
||||||
import net.minecraft.server.PlayerManager;
|
import net.minecraft.server.PlayerManager;
|
||||||
import net.minecraft.server.network.ConnectedClientData;
|
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
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;
|
||||||
|
@ -16,7 +15,7 @@ import static dev.jonasjones.yadcl.dcbot.DiscordBot.sendToDiscord;
|
||||||
@Mixin(PlayerManager.class)
|
@Mixin(PlayerManager.class)
|
||||||
public class PlayerManagerMixin {
|
public class PlayerManagerMixin {
|
||||||
@Inject(at = @At("HEAD"), method = "onPlayerConnect")
|
@Inject(at = @At("HEAD"), method = "onPlayerConnect")
|
||||||
public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData, CallbackInfo ci) {
|
public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, CallbackInfo ci) {
|
||||||
if (ModConfigs.PLAYER_JOIN_LEAVE_MSG) {
|
if (ModConfigs.PLAYER_JOIN_LEAVE_MSG) {
|
||||||
sendToDiscord(player.getDisplayName().getString() + " joined the game");
|
sendToDiscord(player.getDisplayName().getString() + " joined the game");
|
||||||
/*if (ModConfigs.BOT_STATUS.equals("PlayerCount")) {
|
/*if (ModConfigs.BOT_STATUS.equals("PlayerCount")) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.14.22",
|
"fabricloader": ">=0.14.22",
|
||||||
"minecraft": "~1.20.2",
|
"minecraft": ">=1.17",
|
||||||
"java": ">=17",
|
"java": ">=17",
|
||||||
"fabric-api": "*"
|
"fabric-api": "*"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue