New Modules and update to 1.19.3 (#186)

This commit is contained in:
SodaXwX
2022-12-23 21:45:57 +08:00
committed by GitHub
parent 64933773a7
commit 3c14b3bc8f
33 changed files with 663 additions and 454 deletions

View File

@@ -0,0 +1,18 @@
package anticope.rejects.mixin;
import anticope.rejects.events.StopUsingItemEvent;
import meteordevelopment.meteorclient.MeteorClient;
import net.minecraft.client.network.ClientPlayerInteractionManager;
import net.minecraft.entity.player.PlayerEntity;
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;
@Mixin(ClientPlayerInteractionManager.class)
public class ClientPlayerInteractionManagerMixin {
@Inject(at = @At("HEAD"), method = "stopUsingItem")
public void onStopUsingItem(PlayerEntity player, CallbackInfo ci) {
MeteorClient.EVENT_BUS.post(StopUsingItemEvent.get(player.getInventory().getMainHandStack()));
}
}