Added particle for when opening the chests

This commit is contained in:
LCastr0 2017-03-03 22:34:21 -03:00
parent 2b18d62f0f
commit 4a496ea4c1
2 changed files with 36 additions and 3 deletions

View File

@ -110,6 +110,30 @@ public class ShapeWings extends ShapeGrid implements CosmeticShape
"00000$#$00000", "00000$#$00000",
"000000$000000" "000000$000000"
}; };
public static final String[] FOUR_LEAF_CLOVER = new String[]
{
"$$$$$$$$###$$$$$$$",
"$$$$$$##***#$$$$$$",
"$$$$##****%#$$$$$$",
"$$$#******%#$###$$",
"$$$#***%#%%##***#$",
"$$$$#**%#%#*****#$",
"$$$####*%%#*%%**#$",
"$##***#*%#**##**##",
"#***%%*###******%#",
"#**%##*%###%%%%%%#",
"#**#**%%#**######$",
"$#****%#*****#$$$$",
"$$#*%%%#******#$$$",
"$$#####**%#****#$$",
"$$$$$##**%#***%#$$",
"$$$$$###****%%%#$$",
"$$$$##$#%%%%%##$$$",
"$$$##$$$#####$$$$$",
"$###$$$$$$$$$$$$$$",
"$##$$$$$$$$$$$$$$$"
};
/** /**

View File

@ -17,6 +17,7 @@ import org.bukkit.util.Vector;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import mineplex.core.Managers; import mineplex.core.Managers;
import mineplex.core.common.shape.ShapeWings;
import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilBlock;
@ -36,9 +37,6 @@ import mineplex.core.treasure.BlockInfo;
import mineplex.core.treasure.Treasure; import mineplex.core.treasure.Treasure;
import mineplex.core.treasure.TreasureType; import mineplex.core.treasure.TreasureType;
/**
* Created by Shaun on 8/29/2014.
*/
public class ChestSpawnAnimation extends Animation public class ChestSpawnAnimation extends Animation
{ {
private static final int ANIMATION_DURATION = 80; private static final int ANIMATION_DURATION = 80;
@ -62,6 +60,10 @@ public class ChestSpawnAnimation extends Animation
private List<ArmorStand> _bats = Lists.newArrayList(); private List<ArmorStand> _bats = Lists.newArrayList();
private ShapeWings _cloverBlack = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, '#', ShapeWings.DEFAULT_ROTATION, ShapeWings.FOUR_LEAF_CLOVER);
private ShapeWings _cloverDarkGreen = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, '%', ShapeWings.DEFAULT_ROTATION, ShapeWings.FOUR_LEAF_CLOVER);
private ShapeWings _cloverGreen = new ShapeWings(ParticleType.RED_DUST.particleName, new Vector(1, 1, 1), 1, 0, '*', ShapeWings.DEFAULT_ROTATION, ShapeWings.FOUR_LEAF_CLOVER);
public ChestSpawnAnimation(Treasure treasure, Block block, List<BlockInfo> chestBlockInfo, Block openingCenter, double radialOffset, JavaPlugin javaPlugin) public ChestSpawnAnimation(Treasure treasure, Block block, List<BlockInfo> chestBlockInfo, Block openingCenter, double radialOffset, JavaPlugin javaPlugin)
{ {
super(treasure); super(treasure);
@ -245,6 +247,13 @@ public class ChestSpawnAnimation extends Animation
doBats(true, _centerLocation.clone().add(0, 6, 0), _bats); doBats(true, _centerLocation.clone().add(0, 6, 0), _bats);
} }
} }
else if (getTreasure().getTreasureType() == TreasureType.ST_PATRICKS)
{
Location location = _centerLocation.clone().add(0, 5, 0);
_cloverBlack.displayColored(location, Color.BLACK);
_cloverDarkGreen.displayColored(location, new Color(0, 100, 0));
_cloverGreen.displayColored(location, Color.GREEN);
}
//Spawn Chest //Spawn Chest
if (getTicks() >= ANIMATION_DURATION) if (getTicks() >= ANIMATION_DURATION)