forked from xjboss/KCauldronX
Initial commit (Forge 1291).
This commit is contained in:
21
patches/net/minecraft/entity/passive/EntityOcelot.java.patch
Normal file
21
patches/net/minecraft/entity/passive/EntityOcelot.java.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
- return !this.isTamed() && this.ticksExisted > 2400;
|
||||
+ return !this.isTamed(); // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean isAIEnabled()
|
||||
@@ -188,7 +188,8 @@
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
- if (this.rand.nextInt(3) == 0)
|
||||
+ // CraftBukkit - added event call and isCancelled check
|
||||
+ if (this.rand.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, p_70085_1_).isCancelled())
|
||||
{
|
||||
this.setTamed(true);
|
||||
this.setTameSkin(1 + this.worldObj.rand.nextInt(3));
|
Reference in New Issue
Block a user