Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Vec3 findLog()
- /* */ {
- /* 192 */ Random rand = this.theGolem.getRNG();
- /* */
- /* 194 */ for (int var2 = 0; var2 < this.distance * 4.0F; var2++)
- /* */ {
- /* 196 */ int x = (int)(this.theGolem.getHomePosition().posX + rand.nextInt((int)(1.0F + this.distance * 2.0F)) - this.distance);
- /* 197 */ int y = (int)(this.theGolem.getHomePosition().posY + rand.nextInt((int)(1.0F + this.distance)) - this.distance / 2.0F);
- /* 198 */ int z = (int)(this.theGolem.getHomePosition().posZ + rand.nextInt((int)(1.0F + this.distance * 2.0F)) - this.distance);
- /* 199 */ if (Utils.isWoodLog(this.theWorld, x, y, z)) {
- /* 200 */ Vec3 v = Vec3.createVectorHelper(x, y, z);
- /* 201 */ double dist = this.theGolem.getDistanceSq(x + 0.5D, y + 0.5D, z + 0.5D);
- /* 202 */ int yy = 1;
- /* 203 */ while ((Utils.isWoodLog(this.theWorld, x, y - yy, z)) && (this.theGolem.getDistanceSq(x + 0.5D, y - yy + 0.5D, z + 0.5D) < dist)) {
- /* 204 */ v = Vec3.createVectorHelper(x, y - yy, z);
- /* 205 */ dist = this.theGolem.getDistanceSq(x + 0.5D, y - yy + 0.5D, z + 0.5D);
- /* 206 */ yy++;
- /* */ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement