Updated to 1.19

This commit is contained in:
mdo992 2022-06-08 09:22:05 -07:00
parent 53eff455bf
commit 2f5612aa05
7 changed files with 17 additions and 13 deletions

View file

@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6
# Mod Properties
mod_version = 1.2.0
@ -14,4 +14,4 @@ org.gradle.jvmargs=-Xmx1G
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.47.10+1.18.2
fabric_version=0.55.2+1.19

View file

@ -10,7 +10,7 @@ public class FakePlayerEntity extends OtherClientPlayerEntity {
ClientWorld world = SongPlayer.MC.world;
public FakePlayerEntity() {
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile());
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile(), SongPlayer.MC.player.getPublicKey());
copyStagePosAndPlayerLook();

View file

@ -2,7 +2,6 @@ package com.github.hhhzzzsss.songplayer;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.text.LiteralText;
import net.minecraft.util.math.Vec3d;
public class Freecam {

View file

@ -7,7 +7,8 @@ import com.github.hhhzzzsss.songplayer.song.Song;
import net.fabricmc.api.ModInitializer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.text.LiteralText;
import net.minecraft.text.LiteralTextContent;
import net.minecraft.text.Text;
public class SongPlayer implements ModInitializer {
@ -41,6 +42,6 @@ public class SongPlayer implements ModInitializer {
}
public static void addChatMessage(String message) {
MC.player.sendMessage(new LiteralText(message), false);
MC.player.sendMessage(Text.of(message), false);
}
}

View file

@ -8,11 +8,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.github.hhhzzzsss.songplayer.CommandProcessor;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.text.Text;
import javax.annotation.Nullable;
@Mixin(ClientPlayerEntity.class)
public class ClientPlayerEntityMixin {
@Inject(at = @At("HEAD"), method = "sendChatMessage(Ljava/lang/String;)V", cancellable=true)
private void onSendChatMessage(String message, CallbackInfo ci) {
@Inject(at = @At("HEAD"), method = "sendChatMessage(Ljava/lang/String;Lnet/minecraft/text/Text;)V", cancellable=true)
private void onSendChatMessage(String message, @Nullable Text preview, CallbackInfo ci) {
boolean isCommand = CommandProcessor.processChatMessage(message);
if (isCommand) {
ci.cancel();

View file

@ -189,6 +189,6 @@ public class BuildingThread extends Thread {
fx += p.getX();
fy += p.getY();
fz += p.getZ();
SongPlayer.MC.interactionManager.interactBlock(player, world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(fx, fy, fz), Direction.UP, p, false));
SongPlayer.MC.interactionManager.interactBlock(player, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(fx, fy, fz), Direction.UP, p, false));
}
}

View file

@ -26,9 +26,10 @@
],
"depends": {
"fabricloader": ">=0.13.3",
"fabricloader": ">=0.14.6",
"fabric": "*",
"minecraft": "1.18.x"
"minecraft": "~1.19",
"java": ">=17"
},
"suggests": {
"flamingo": "*"