decreased number of fireworks fired, added black and white to sheep colours, decreased sheep jump height

This commit is contained in:
Gibstick 2013-07-20 12:38:30 -04:00
parent 9e6c49e056
commit 1336cc1aaf
2 changed files with 9 additions and 7 deletions

View File

@ -31,7 +31,7 @@ public class DiscoParty {
static int defaultPeriod = 10; // ticks per state change static int defaultPeriod = 10; // ticks per state change
static int defaultRadius = 5; static int defaultRadius = 5;
static int defaultSheep = 10; static int defaultSheep = 10;
static float defaultSheepJump = 0.5f; static float defaultSheepJump = 0.35f;
static int maxDuration = 2400; // 120 seconds static int maxDuration = 2400; // 120 seconds
static int maxSheep = 100; static int maxSheep = 100;
static int maxRadius = 100; static int maxRadius = 100;
@ -52,7 +52,9 @@ public class DiscoParty {
DyeColor.MAGENTA, DyeColor.MAGENTA,
DyeColor.LIME, DyeColor.LIME,
DyeColor.CYAN, DyeColor.CYAN,
DyeColor.PURPLE DyeColor.PURPLE,
DyeColor.BLACK,
DyeColor.WHITE
}; };
public DiscoParty(DiscoSheep parent, Player player) { public DiscoParty(DiscoSheep parent, Player player) {
@ -254,12 +256,14 @@ public class DiscoParty {
} }
void updateAllSheep() { void updateAllSheep() {
int i = 0;
for (Sheep sheeple : getSheep()) { for (Sheep sheeple : getSheep()) {
randomizeSheepColour(sheeple); randomizeSheepColour(sheeple);
if (doFireworks && state % 8 == 0) { if (doFireworks && state % 8 == 0) {
if (Math.random() < 0.50) {
spawnRandomFireworkAtSheep(sheeple); spawnRandomFireworkAtSheep(sheeple);
} }
}
if (doJump) { if (doJump) {
if (state % 2 == 0) { if (state % 2 == 0) {
@ -268,7 +272,6 @@ public class DiscoParty {
} }
} }
} }
i++;
} }
} }
@ -303,7 +306,7 @@ public class DiscoParty {
// set random effect and randomize power // set random effect and randomize power
meta.addEffect(effect.build()); meta.addEffect(effect.build());
meta.setPower(r.nextInt(2)); meta.setPower(r.nextInt(2)+1);
// apply it to the given firework // apply it to the given firework
firework.setFireworkMeta(meta); firework.setFireworkMeta(meta);

View File

@ -5,7 +5,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
public final class DiscoSheep extends JavaPlugin { public final class DiscoSheep extends JavaPlugin {