Fire AnimalTameEvent for cats (#7172) Closes #7171

This commit is contained in:
Jamie Mansfield 2020-07-28 00:00:14 +01:00 committed by GitHub
parent 7717795f42
commit 720966544d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/net/minecraft/entity/passive/CatEntity.java
+++ b/net/minecraft/entity/passive/CatEntity.java
@@ -402,7 +402,7 @@
}
} else if (this.func_70877_b(itemstack)) {
this.func_175505_a(p_230254_1_, itemstack);
- if (this.field_70146_Z.nextInt(3) == 0) {
+ if (this.field_70146_Z.nextInt(3) == 0 && !net.minecraftforge.event.ForgeEventFactory.onAnimalTame(this, p_230254_1_)) {
this.func_193101_c(p_230254_1_);
this.func_233687_w_(true);
this.field_70170_p.func_72960_a(this, (byte)7);