Fix missing cancellable in RedstoneOreBlock(#109)

This commit is contained in:
IzzelAliz 2020-12-29 19:07:30 +08:00
parent e63e214546
commit 1a16e3a933

View File

@ -39,7 +39,7 @@ public abstract class RedstoneOreBlockMixin {
arclight$entity = player; arclight$entity = player;
} }
@Inject(method = "onEntityWalk", at = @At(value = "HEAD")) @Inject(method = "onEntityWalk", cancellable = true, at = @At(value = "HEAD"))
public void arclight$entityInteract(World worldIn, BlockPos pos, Entity entityIn, CallbackInfo ci) { public void arclight$entityInteract(World worldIn, BlockPos pos, Entity entityIn, CallbackInfo ci) {
if (entityIn instanceof PlayerEntity) { if (entityIn instanceof PlayerEntity) {
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(((PlayerEntity) entityIn), Action.PHYSICAL, pos, null, null, null); PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(((PlayerEntity) entityIn), Action.PHYSICAL, pos, null, null, null);