fixing fireworks problem on mac os
This commit is contained in:
parent
ff4ca68366
commit
fdd599ca97
1 changed files with 1 additions and 8 deletions
|
@ -8,18 +8,11 @@ var explosionTypes = ['STAR','BURST','CREEPER','LARGE','SMALL'];
|
||||||
var cmDyeColor = Packages.net.canarymod.api.DyeColor;
|
var cmDyeColor = Packages.net.canarymod.api.DyeColor;
|
||||||
var entityFactory = Canary.factory().entityFactory;
|
var entityFactory = Canary.factory().entityFactory;
|
||||||
var cmEntityType = Packages.net.canarymod.api.entity.EntityType;
|
var cmEntityType = Packages.net.canarymod.api.entity.EntityType;
|
||||||
var colors = [].concat(cmDyeColor.values());
|
|
||||||
|
|
||||||
function canaryFirework( location ) {
|
function canaryFirework( location ) {
|
||||||
|
|
||||||
var firework = items.fireworkStar(1);
|
var firework = items.fireworkStar(1);
|
||||||
var i1 = Math.floor(Math.random()* colors.length);
|
cmFireworkHelper.addStarColors( firework, cmDyeColor.values() );
|
||||||
var i2 = Math.floor(Math.random()* colors.length);
|
|
||||||
var colorsToUse = colors.slice(Math.min(i1,i2),Math.max(i1,i2));
|
|
||||||
if (colorsToUse.length == 0){
|
|
||||||
colorsToUse = colors;
|
|
||||||
}
|
|
||||||
cmFireworkHelper.addStarColors( firework, colorsToUse );
|
|
||||||
cmFireworkHelper.setDoesFlicker( firework, true );
|
cmFireworkHelper.setDoesFlicker( firework, true );
|
||||||
cmFireworkHelper.setDoesTrail( firework, true );
|
cmFireworkHelper.setDoesTrail( firework, true );
|
||||||
|
|
||||||
|
|
Reference in a new issue