mirror of https://github.com/cabaletta/baritone
1.19.1
This commit is contained in:
parent
06be5f5372
commit
61b9762a22
|
@ -26,6 +26,6 @@
|
|||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.0",
|
||||
"minecraft": "1.19.1-rc.2"
|
||||
"minecraft": "1.19.1"
|
||||
}
|
||||
}
|
|
@ -4,10 +4,6 @@ mod_version=1.9.0-local
|
|||
maven_group=baritone
|
||||
archives_base_name=baritone
|
||||
|
||||
minecraft_version=1.19.1-rc2
|
||||
minecraft_version=1.19.1
|
||||
forge_version=1.19.1-41.0.1
|
||||
fabric_version=0.14.8
|
||||
|
||||
# # un comment for forge debugging default (as opposed to fabric)
|
||||
# baritone.forge_build=true
|
||||
# loom.platform=forge
|
||||
fabric_version=0.14.8
|
|
@ -26,6 +26,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
import net.minecraft.network.Connection;
|
||||
import net.minecraft.network.PacketSendListener;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.PacketFlow;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
|
@ -53,14 +54,14 @@ public class MixinNetworkManager {
|
|||
method = "sendPacket",
|
||||
at = @At("HEAD")
|
||||
)
|
||||
private void preDispatchPacket(Packet<?> inPacket, final GenericFutureListener<? extends Future<? super Void>> futureListeners, CallbackInfo ci) {
|
||||
private void preDispatchPacket(Packet<?> packet, PacketSendListener packetSendListener, CallbackInfo ci) {
|
||||
if (this.receiving != PacketFlow.CLIENTBOUND) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (IBaritone ibaritone : BaritoneAPI.getProvider().getAllBaritones()) {
|
||||
if (ibaritone.getPlayerContext().player() != null && ibaritone.getPlayerContext().player().connection.getConnection() == (Connection) (Object) this) {
|
||||
ibaritone.getGameEventHandler().onSendPacket(new PacketEvent((Connection) (Object) this, EventState.PRE, inPacket));
|
||||
ibaritone.getGameEventHandler().onSendPacket(new PacketEvent((Connection) (Object) this, EventState.PRE, packet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,14 +70,14 @@ public class MixinNetworkManager {
|
|||
method = "sendPacket",
|
||||
at = @At("RETURN")
|
||||
)
|
||||
private void postDispatchPacket(Packet<?> inPacket, final GenericFutureListener<? extends Future<? super Void>> futureListeners, CallbackInfo ci) {
|
||||
private void postDispatchPacket(Packet<?> packet, PacketSendListener packetSendListener, CallbackInfo ci) {
|
||||
if (this.receiving != PacketFlow.CLIENTBOUND) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (IBaritone ibaritone : BaritoneAPI.getProvider().getAllBaritones()) {
|
||||
if (ibaritone.getPlayerContext().player() != null && ibaritone.getPlayerContext().player().connection.getConnection() == (Connection) (Object) this) {
|
||||
ibaritone.getGameEventHandler().onSendPacket(new PacketEvent((Connection) (Object) this, EventState.POST, inPacket));
|
||||
ibaritone.getGameEventHandler().onSendPacket(new PacketEvent((Connection) (Object) this, EventState.POST, packet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue