From 1336cc1aafd904e92e0e54b2d1d03b215b1b333b Mon Sep 17 00:00:00 2001 From: Gibstick Date: Sat, 20 Jul 2013 12:38:30 -0400 Subject: [PATCH] decreased number of fireworks fired, added black and white to sheep colours, decreased sheep jump height --- src/ca/gibstick/discosheep/DiscoParty.java | 15 +++++++++------ src/ca/gibstick/discosheep/DiscoSheep.java | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ca/gibstick/discosheep/DiscoParty.java b/src/ca/gibstick/discosheep/DiscoParty.java index 6881282..e0769fd 100644 --- a/src/ca/gibstick/discosheep/DiscoParty.java +++ b/src/ca/gibstick/discosheep/DiscoParty.java @@ -31,7 +31,7 @@ public class DiscoParty { static int defaultPeriod = 10; // ticks per state change static int defaultRadius = 5; static int defaultSheep = 10; - static float defaultSheepJump = 0.5f; + static float defaultSheepJump = 0.35f; static int maxDuration = 2400; // 120 seconds static int maxSheep = 100; static int maxRadius = 100; @@ -52,7 +52,9 @@ public class DiscoParty { DyeColor.MAGENTA, DyeColor.LIME, DyeColor.CYAN, - DyeColor.PURPLE + DyeColor.PURPLE, + DyeColor.BLACK, + DyeColor.WHITE }; public DiscoParty(DiscoSheep parent, Player player) { @@ -254,11 +256,13 @@ public class DiscoParty { } void updateAllSheep() { - int i = 0; for (Sheep sheeple : getSheep()) { randomizeSheepColour(sheeple); + if (doFireworks && state % 8 == 0) { - spawnRandomFireworkAtSheep(sheeple); + if (Math.random() < 0.50) { + spawnRandomFireworkAtSheep(sheeple); + } } if (doJump) { @@ -268,7 +272,6 @@ public class DiscoParty { } } } - i++; } } @@ -303,7 +306,7 @@ public class DiscoParty { // set random effect and randomize power meta.addEffect(effect.build()); - meta.setPower(r.nextInt(2)); + meta.setPower(r.nextInt(2)+1); // apply it to the given firework firework.setFireworkMeta(meta); diff --git a/src/ca/gibstick/discosheep/DiscoSheep.java b/src/ca/gibstick/discosheep/DiscoSheep.java index 8ceda28..dc1cdb3 100644 --- a/src/ca/gibstick/discosheep/DiscoSheep.java +++ b/src/ca/gibstick/discosheep/DiscoSheep.java @@ -5,7 +5,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public final class DiscoSheep extends JavaPlugin {