-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ground_slam.js
59 lines (48 loc) · 1.93 KB
/
Ground_slam.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//});
/*events.blockRightClick ( function (event) {
echo ( event.player, "you broke a block" );
});
events.entityRightClick ( function (event) {
echo ( event.player, "you broke a block" );
});
*/
events.blockRightClick ( function (event) {
var EXPLOSIVE_YIELD = 10;
var loc = event.blockClicked.location;
event.player.world.makeExplosion( event.player, loc, EXPLOSIVE_YIELD, true);
});
/*public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
world.playSoundAtEntity(entityplayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.8F));
EntityArrow ea = new EntityArrow(world, entityplayer);
world.entityJoinedWorld(ea);
}
return itemstack;
}
public EntityArrow(World world, EntityLiving entityliving)
{
super(world);
xTile = -1;
yTile = -1;
zTile = -1;
inTile = 0;
field_28019_h = 0;
inGround = false;
doesArrowBelongToPlayer = false;
arrowShake = 0;
ticksInAir = 0;
owner = entityliving;
doesArrowBelongToPlayer = entityliving instanceof EntityPlayer;
setSize(0.5F, 0.5F);
setLocationAndAngles(entityliving.posX, entityliving.posY + (double)entityliving.getEyeHeight(), entityliving.posZ, entityliving.rotationYaw, entityliving.rotationPitch);
posX -= MathHelper.cos((rotationYaw / 180F) * 3.141593F) * 0.16F;
posY -= 0.10000000149011612D;
posZ -= MathHelper.sin((rotationYaw / 180F) * 3.141593F) * 0.16F;
setPosition(posX, posY, posZ);
yOffset = 0.0F;
motionX = -MathHelper.sin((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
motionZ = MathHelper.cos((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
motionY = -MathHelper.sin((rotationPitch / 180F) * 3.141593F);
setArrowHeading(motionX, motionY, motionZ, 1.5F, 1.0F);
}
*/