diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-08 08:52:10 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-08 08:52:10 +0200 |
commit | 27d1dfa82bf52bca0d041416d500097cd96e4c42 (patch) | |
tree | 33e3d320aac19a2a46e27a681d129b8dd5a2ab6d /src/main/java/at | |
parent | d188f0135b13ed23a77d46db4ed2040dc1b14bf7 (diff) | |
parent | cb1e008e7f61111e1bc480eadc7f7668862e9f5d (diff) | |
download | skyhanni-27d1dfa82bf52bca0d041416d500097cd96e4c42.tar.gz skyhanni-27d1dfa82bf52bca0d041416d500097cd96e4c42.tar.bz2 skyhanni-27d1dfa82bf52bca0d041416d500097cd96e4c42.zip |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
Diffstat (limited to 'src/main/java/at')
3 files changed, 11 insertions, 12 deletions
diff --git a/src/main/java/at/lorenz/mod/mixins/MixinGuiContainer.java b/src/main/java/at/lorenz/mod/mixins/MixinGuiContainer.java index c9dc12fc5..a0cf8fdbe 100644 --- a/src/main/java/at/lorenz/mod/mixins/MixinGuiContainer.java +++ b/src/main/java/at/lorenz/mod/mixins/MixinGuiContainer.java @@ -41,10 +41,8 @@ public abstract class MixinGuiContainer extends GuiScreen { hook.onDrawSlotPost(slot, ci); } - @Inject(method = "handleMouseClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/PlayerControllerMP;windowClick(IIIILnet/minecraft/entity/player/EntityPlayer;)Lnet/minecraft/item/ItemStack;"), cancellable = true) private void onMouseClick(Slot slot, int slotId, int clickedButton, int clickType, CallbackInfo ci) { hook.onMouseClick(slot, slotId, clickedButton, clickType, ci); } - } diff --git a/src/main/java/at/lorenz/mod/mixins/MixinNetHandlerPlayClient.java b/src/main/java/at/lorenz/mod/mixins/MixinNetHandlerPlayClient.java index 9944a83ac..383fc114e 100644 --- a/src/main/java/at/lorenz/mod/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/at/lorenz/mod/mixins/MixinNetHandlerPlayClient.java @@ -15,6 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(value = NetHandlerPlayClient.class, priority = 1001) public abstract class MixinNetHandlerPlayClient implements INetHandlerPlayClient { + @Shadow private WorldClient clientWorldController; @@ -22,13 +23,12 @@ public abstract class MixinNetHandlerPlayClient implements INetHandlerPlayClient private void onSendPacket(Packet<?> packet, CallbackInfo ci) { NetHandlerPlayClientHookKt.onSendPacket(packet, ci); } - -// @Inject(method = "handleSpawnMob", at = @At("TAIL")) -// private void onHandleSpawnMobTail(S0FPacketSpawnMob packetIn, CallbackInfo ci) { -// Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID()); -// MasterMode7Features.INSTANCE.onMobSpawned(entity); -// ((ExtensionEntityLivingBase) entity).getSkytilsHook().onNewDisplayName( -// entity.getDataWatcher().getWatchableObjectString(2) -// ); -// } + // @Inject(method = "handleSpawnMob", at = @At("TAIL")) + // private void onHandleSpawnMobTail(S0FPacketSpawnMob packetIn, CallbackInfo ci) { + // Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID()); + // MasterMode7Features.INSTANCE.onMobSpawned(entity); + // ((ExtensionEntityLivingBase) entity).getSkytilsHook().onNewDisplayName( + // entity.getDataWatcher().getWatchableObjectString(2) + // ); + // } } diff --git a/src/main/java/at/lorenz/mod/mixins/MixinNetworkManager.java b/src/main/java/at/lorenz/mod/mixins/MixinNetworkManager.java index c2314201b..d8b2d0fd9 100644 --- a/src/main/java/at/lorenz/mod/mixins/MixinNetworkManager.java +++ b/src/main/java/at/lorenz/mod/mixins/MixinNetworkManager.java @@ -1,5 +1,6 @@ package at.lorenz.mod.mixins; +import at.lorenz.mod.mixinhooks.NetworkManagerHookKt; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import net.minecraft.network.NetworkManager; @@ -8,10 +9,10 @@ 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 at.lorenz.mod.mixinhooks.NetworkManagerHookKt; @Mixin(value = NetworkManager.class, priority = 1001) public abstract class MixinNetworkManager extends SimpleChannelInboundHandler<Packet<?>> { + @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) private void onReceivePacket(ChannelHandlerContext context, Packet<?> packet, CallbackInfo ci) { NetworkManagerHookKt.onReceivePacket(context, packet, ci); |