Updated to 1.19.3
This commit is contained in:
parent
7897716386
commit
4038122b94
11 changed files with 83 additions and 38 deletions
45
.gitignore
vendored
45
.gitignore
vendored
|
@ -1,5 +1,40 @@
|
|||
.gradle
|
||||
.idea
|
||||
gradle
|
||||
run
|
||||
build
|
||||
# gradle
|
||||
|
||||
.gradle/
|
||||
build/
|
||||
out/
|
||||
classes/
|
||||
|
||||
# eclipse
|
||||
|
||||
*.launch
|
||||
|
||||
# idea
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# vscode
|
||||
|
||||
.settings/
|
||||
.vscode/
|
||||
bin/
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# macos
|
||||
|
||||
*.DS_Store
|
||||
|
||||
# fabric
|
||||
|
||||
run/
|
||||
|
||||
# java
|
||||
|
||||
hs_err_*.log
|
||||
replay_*.log
|
||||
*.hprof
|
||||
*.jfr
|
20
build.gradle
20
build.gradle
|
@ -1,5 +1,6 @@
|
|||
plugins {
|
||||
id 'fabric-loom' version '0.11-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.0-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
@ -55,3 +56,20 @@ jar {
|
|||
rename { "${it}_${project.archivesBaseName}"}
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
// Notice: This block does NOT have the same function as the block in the top level.
|
||||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.19.2
|
||||
yarn_mappings=1.19.2+build.28
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.5
|
||||
loader_version=0.14.12
|
||||
|
||||
# Mod Properties
|
||||
|
@ -14,4 +15,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.72.0+1.19.2
|
||||
fabric_version=0.71.0+1.19.3
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
|
@ -12,7 +12,7 @@ public class FakePlayerEntity extends OtherClientPlayerEntity {
|
|||
ClientWorld world = SongPlayer.MC.world;
|
||||
|
||||
public FakePlayerEntity() {
|
||||
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile(), SongPlayer.MC.player.getPublicKey());
|
||||
super(SongPlayer.MC.world, SongPlayer.MC.player.getGameProfile());
|
||||
|
||||
copyStagePosAndPlayerLook();
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package com.github.hhhzzzsss.songplayer.mixin;
|
||||
|
||||
import com.github.hhhzzzsss.songplayer.CommandProcessor;
|
||||
import com.github.hhhzzzsss.songplayer.playing.SongHandler;
|
||||
import com.github.hhhzzzsss.songplayer.playing.Stage;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket;
|
||||
import net.minecraft.text.Text;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -37,6 +39,14 @@ public class ClientPlayNetworkHandlerMixin {
|
|||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "sendChatMessage(Ljava/lang/String;)V", cancellable=true)
|
||||
private void onSendChatMessage(String content, CallbackInfo ci) {
|
||||
boolean isCommand = CommandProcessor.processChatMessage(content);
|
||||
if (isCommand) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "onGameJoin(Lnet/minecraft/network/packet/s2c/play/GameJoinS2CPacket;)V")
|
||||
public void onOnGameJoin(GameJoinS2CPacket packet, CallbackInfo ci) {
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package com.github.hhhzzzsss.songplayer.mixin;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
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;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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -278,7 +278,7 @@ public class SongHandler {
|
|||
}
|
||||
private void checkCommandCache() {
|
||||
if (cachedCommand != null && System.currentTimeMillis() >= lastCommandTime + 1500) {
|
||||
SongPlayer.MC.player.sendCommand(cachedCommand);
|
||||
SongPlayer.MC.getNetworkHandler().sendCommand(cachedCommand);
|
||||
cachedCommand = null;
|
||||
lastCommandTime = System.currentTimeMillis();
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.6",
|
||||
"fabricloader": ">=0.14.11",
|
||||
"fabric": "*",
|
||||
"minecraft": "~1.19",
|
||||
"minecraft": "~1.19.3",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"ClientPlayerEntityMixin",
|
||||
"ClientPlayNetworkHandlerMixin",
|
||||
"ChatInputSuggestorMixin",
|
||||
"InGameHudMixin",
|
||||
|
|
Loading…
Reference in a new issue