Updated to 1.19
This commit is contained in:
parent
53eff455bf
commit
2f5612aa05
7 changed files with 17 additions and 13 deletions
|
@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.18.2
|
minecraft_version=1.19
|
||||||
yarn_mappings=1.18.2+build.2
|
yarn_mappings=1.19+build.1
|
||||||
loader_version=0.13.3
|
loader_version=0.14.6
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.0
|
mod_version = 1.2.0
|
||||||
|
@ -14,4 +14,4 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# 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
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class FakePlayerEntity extends OtherClientPlayerEntity {
|
||||||
ClientWorld world = SongPlayer.MC.world;
|
ClientWorld world = SongPlayer.MC.world;
|
||||||
|
|
||||||
public FakePlayerEntity() {
|
public FakePlayerEntity() {
|
||||||
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile());
|
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile(), SongPlayer.MC.player.getPublicKey());
|
||||||
|
|
||||||
copyStagePosAndPlayerLook();
|
copyStagePosAndPlayerLook();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.github.hhhzzzsss.songplayer;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.text.LiteralText;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class Freecam {
|
public class Freecam {
|
||||||
|
|
|
@ -7,7 +7,8 @@ import com.github.hhhzzzsss.songplayer.song.Song;
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.minecraft.client.MinecraftClient;
|
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 {
|
public class SongPlayer implements ModInitializer {
|
||||||
|
|
||||||
|
@ -41,6 +42,6 @@ public class SongPlayer implements ModInitializer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addChatMessage(String message) {
|
public static void addChatMessage(String message) {
|
||||||
MC.player.sendMessage(new LiteralText(message), false);
|
MC.player.sendMessage(Text.of(message), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import com.github.hhhzzzsss.songplayer.CommandProcessor;
|
import com.github.hhhzzzsss.songplayer.CommandProcessor;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
@Mixin(ClientPlayerEntity.class)
|
@Mixin(ClientPlayerEntity.class)
|
||||||
public class ClientPlayerEntityMixin {
|
public class ClientPlayerEntityMixin {
|
||||||
@Inject(at = @At("HEAD"), method = "sendChatMessage(Ljava/lang/String;)V", cancellable=true)
|
@Inject(at = @At("HEAD"), method = "sendChatMessage(Ljava/lang/String;Lnet/minecraft/text/Text;)V", cancellable=true)
|
||||||
private void onSendChatMessage(String message, CallbackInfo ci) {
|
private void onSendChatMessage(String message, @Nullable Text preview, CallbackInfo ci) {
|
||||||
boolean isCommand = CommandProcessor.processChatMessage(message);
|
boolean isCommand = CommandProcessor.processChatMessage(message);
|
||||||
if (isCommand) {
|
if (isCommand) {
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
|
|
|
@ -189,6 +189,6 @@ public class BuildingThread extends Thread {
|
||||||
fx += p.getX();
|
fx += p.getX();
|
||||||
fy += p.getY();
|
fy += p.getY();
|
||||||
fz += p.getZ();
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,10 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.13.3",
|
"fabricloader": ">=0.14.6",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.18.x"
|
"minecraft": "~1.19",
|
||||||
|
"java": ">=17"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"flamingo": "*"
|
"flamingo": "*"
|
||||||
|
|
Loading…
Reference in a new issue