diff options
| author | BuildTools <james.jenour@protonmail.com> | 2021-01-07 12:57:35 +0800 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2021-01-07 12:57:35 +0800 |
| commit | cfa0aa0c9a24aa739d3254b24ef4bf0bea7087a6 (patch) | |
| tree | 37195b6df62d8281e236e0fb87e5d9edbd60f625 /src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java | |
| parent | 9ae63509ab33c4d3f0ee19bc618ef4e4c654ef46 (diff) | |
| download | notenoughupdates-cfa0aa0c9a24aa739d3254b24ef4bf0bea7087a6.tar.gz notenoughupdates-cfa0aa0c9a24aa739d3254b24ef4bf0bea7087a6.tar.bz2 notenoughupdates-cfa0aa0c9a24aa739d3254b24ef4bf0bea7087a6.zip | |
PRE4
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(); + } + + + } |
