Fire AnimalTameEvent for cats (#7172) Closes #7171

This commit is contained in:
Jamie Mansfield authored and GitHub committed 2020-07-27 16:00:14 -07:00
1 parent 7717795f42
commit 720966544d
1 file changed
+11
@@ -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);