1
0
Fork 0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-04-17 19:12:14 +02:00

Merge branch 'block-item-mixin-fix' into custom-item-api-v2

This commit is contained in:
Eclipse 2025-04-07 14:42:31 +00:00
commit c510204f6e
No known key found for this signature in database
GPG key ID: 95E6998F82EC938A

View file

@ -49,6 +49,10 @@ public class BlockPlaceMixin {
@Inject(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;playSound(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/core/BlockPos;Lnet/minecraft/sounds/SoundEvent;Lnet/minecraft/sounds/SoundSource;FF)V"))
private void geyser$hijackPlaySound(BlockPlaceContext blockPlaceContext, CallbackInfoReturnable<InteractionResult> callbackInfoReturnable,
@Local BlockPos pos, @Local Player player, @Local(ordinal = 1) BlockState placedState) {
if (player == null) {
return;
}
GeyserSession session = GeyserImpl.getInstance().connectionByUuid(player.getUUID());
if (session == null) {
return;