鱼钩不能再钩载具上的乘客
This commit is contained in:
parent
e07d2c0a61
commit
40c6256a8a
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ public class FishingHookMixin {
|
||||||
|
|
||||||
@Inject(method = "canHitEntity(Lnet/minecraft/world/entity/Entity;)Z", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "canHitEntity(Lnet/minecraft/world/entity/Entity;)Z", at = @At("HEAD"), cancellable = true)
|
||||||
private void canHook(Entity entity, CallbackInfoReturnable<Boolean> cir) {
|
private void canHook(Entity entity, CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (entity instanceof VehicleEntity) {
|
if (entity instanceof VehicleEntity || entity.getVehicle() instanceof VehicleEntity) {
|
||||||
cir.setReturnValue(false);
|
cir.setReturnValue(false);
|
||||||
cir.cancel();
|
cir.cancel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue