Colorful sheep!
This commit is contained in:
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
author: garbagemule
|
author: garbagemule
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.94.4.59
|
version: 0.94.4.60
|
||||||
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
package com.garbagemule.MobArena.waves;
|
package com.garbagemule.MobArena.waves;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Sheep;
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
import org.bukkit.entity.Wolf;
|
import org.bukkit.entity.Wolf;
|
||||||
|
|
||||||
@@ -62,6 +67,7 @@ public enum MACreature
|
|||||||
MAGMACUBEBIG(EntityType.MAGMA_CUBE), MAGMACUBESBIG(EntityType.MAGMA_CUBE),
|
MAGMACUBEBIG(EntityType.MAGMA_CUBE), MAGMACUBESBIG(EntityType.MAGMA_CUBE),
|
||||||
MAGMACUBEHUGE(EntityType.MAGMA_CUBE), MAGMACUBESHUGE(EntityType.MAGMA_CUBE);
|
MAGMACUBEHUGE(EntityType.MAGMA_CUBE), MAGMACUBESHUGE(EntityType.MAGMA_CUBE);
|
||||||
|
|
||||||
|
private List<DyeColor> colors = Arrays.asList(DyeColor.values());
|
||||||
private EntityType type;
|
private EntityType type;
|
||||||
|
|
||||||
private MACreature(EntityType type) {
|
private MACreature(EntityType type) {
|
||||||
@@ -79,10 +85,13 @@ public enum MACreature
|
|||||||
public LivingEntity spawn(Arena arena, World world, Location loc) {
|
public LivingEntity spawn(Arena arena, World world, Location loc) {
|
||||||
LivingEntity e = world.spawnCreature(loc, type);
|
LivingEntity e = world.spawnCreature(loc, type);
|
||||||
|
|
||||||
switch (this)
|
switch (this) {
|
||||||
{
|
case SHEEP:
|
||||||
|
((Sheep) e).setColor(colors.get(MobArena.random.nextInt(colors.size())));
|
||||||
|
break;
|
||||||
case EXPLODINGSHEEP:
|
case EXPLODINGSHEEP:
|
||||||
arena.getMonsterManager().addExplodingSheep(e);
|
arena.getMonsterManager().addExplodingSheep(e);
|
||||||
|
((Sheep) e).setColor(DyeColor.RED);
|
||||||
break;
|
break;
|
||||||
case POWEREDCREEPERS:
|
case POWEREDCREEPERS:
|
||||||
((Creeper) e).setPowered(true);
|
((Creeper) e).setPowered(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user