Created
February 14, 2013 15:48
-
-
Save IQAndreas/4953662 to your computer and use it in GitHub Desktop.
Partial from MineCraft decompiled source - `EntityFishHook::onUpdate()`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.ticksCatchable > 0) | |
{ | |
--this.ticksCatchable; | |
} | |
else | |
{ | |
short var28 = 500; | |
if (this.worldObj.canLightningStrikeAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY) + 1, MathHelper.floor_double(this.posZ))) | |
{ | |
var28 = 300; | |
} | |
if (this.rand.nextInt(var28) == 0) | |
{ | |
this.ticksCatchable = this.rand.nextInt(30) + 10; | |
// ... Play splashing sounds and particles | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment