diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java index 0bb84f44..19bcdacf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java @@ -1,16 +1,16 @@ package io.github.moulberry.notenoughupdates.mixins; -import io.github.moulberry.notenoughupdates.CustomItemEffects; +import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects; +import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; -import io.github.moulberry.notenoughupdates.StreamerMode; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.scoreboard.ScorePlayerTeam; -import net.minecraft.scoreboard.Team; -import org.lwjgl.util.vector.Vector3f; +import net.minecraft.network.play.server.S2FPacketSetSlot; 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.Redirect; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(NetHandlerPlayClient.class) public class MixinNetHandlerPlayClient { @@ -21,9 +21,16 @@ public class MixinNetHandlerPlayClient { public void handlePlayerPosLook_setPositionAndRotation(EntityPlayer player, double x, double y, double z, float yaw, float pitch) { if(CustomItemEffects.INSTANCE.aoteTeleportationCurr != null) { CustomItemEffects.INSTANCE.aoteTeleportationMillis += - Math.max(0, Math.min(300, NotEnoughUpdates.INSTANCE.manager.config.smoothAoteMillis.value)); + Math.max(0, Math.min(300, NotEnoughUpdates.INSTANCE.config.smoothAOTE.smoothTpMillis)); } player.setPositionAndRotation(x, y, z, yaw, pitch); } + @Inject(method="handleSetSlot", at=@At("HEAD")) + public void handleSetSlot(S2FPacketSetSlot packetIn, CallbackInfo ci) { + EnchantingSolvers.processInventoryContents(); + } + + + } |
