From 73604bfa1ad8af17bbb30c7753a7d54fb31b90bf Mon Sep 17 00:00:00 2001 From: Gibstick Date: Sat, 9 Nov 2013 16:02:35 -0500 Subject: [PATCH] added random floor colour --- src/ca/gibstick/discosheep/DiscoParty.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ca/gibstick/discosheep/DiscoParty.java b/src/ca/gibstick/discosheep/DiscoParty.java index af1ec1a..eb9a647 100644 --- a/src/ca/gibstick/discosheep/DiscoParty.java +++ b/src/ca/gibstick/discosheep/DiscoParty.java @@ -21,6 +21,7 @@ import org.bukkit.block.BlockState; import org.bukkit.entity.Entity; import org.bukkit.event.HandlerList; import org.bukkit.inventory.meta.FireworkMeta; +import org.bukkit.material.Wool; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; @@ -331,8 +332,9 @@ public class DiscoParty { sheep.setColor(discoColours[(r.nextInt(discoColours.length))]); } - void randomizeFloorColor(Block block) { - // Randomize them colors, boi + void randomizeFloorColour(Block block) { + block.setType(Material.WOOL); + block.setData(discoColours[(r.nextInt(discoColours.length))].getData()); } void jump(Entity entity) { @@ -426,7 +428,7 @@ public class DiscoParty { } for (Block block : this.floorBlocks) { - this.randomizeFloorColor(block); + this.randomizeFloorColour(block); } }