From 21c10851f345241164afc64789115979c6c8b177 Mon Sep 17 00:00:00 2001 From: RangerMauve Date: Fri, 12 Jul 2013 08:47:18 -0400 Subject: [PATCH] Sheep alternate jumping, half the sheep jump at a time. --- .../bukkit/discosheep/DiscoParty.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/gibstick/bukkit/discosheep/DiscoParty.java b/src/gibstick/bukkit/discosheep/DiscoParty.java index d734ca1..2d9f015 100644 --- a/src/gibstick/bukkit/discosheep/DiscoParty.java +++ b/src/gibstick/bukkit/discosheep/DiscoParty.java @@ -172,16 +172,23 @@ public class DiscoParty { } void updateAllSheep() { + int i = 0; for (Sheep sheep : getSheep()) { randomizeSheepColour(sheep); - if (state % 8 == 0) { // HA HA IT LOOKS LIKE A PENIS - if (doFireworks) { - spawnRandomFireworkAtSheep(sheep); - } - if(doJump){ - jumpSheep(sheep); + if (doFireworks && state % 8 == 0) { + spawnRandomFireworkAtSheep(sheep); + } + + if (doJump) { + if (state % 4 == 0) { + if ((state % 8 == 0) && (i % 2 == 0)) { + jumpSheep(sheep); + } else if (i % 2 != 0) { + jumpSheep(sheep); + } } } + i++; } }