use of blusunrize.immersiveengineering.common.entities.EntityRevolvershot in project ImmersiveEngineering by BluSunrize.
the class TileEntityBalloon method onEntityCollision.
@Override
public void onEntityCollision(World world, Entity entity) {
if (entity instanceof EntityArrow || entity instanceof EntityRevolvershot) {
Vec3d pos = new Vec3d(getPos()).add(.5, .5, .5);
world.playSound(null, pos.x, pos.y, pos.z, SoundEvents.ENTITY_FIREWORK_BLAST, SoundCategory.BLOCKS, 1.5f, 0.7f);
world.setBlockToAir(getPos());
world.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, pos.x, pos.y, pos.z, 0, .05, 0);
Triple<ItemStack, ShaderRegistryEntry, ShaderCase> shader = ShaderRegistry.getStoredShaderAndCase(this.shader);
if (shader != null)
shader.getMiddle().getEffectFunction().execute(world, shader.getLeft(), null, shader.getRight().getShaderType(), pos, null, .375f);
}
}
use of blusunrize.immersiveengineering.common.entities.EntityRevolvershot in project ImmersiveEngineering by BluSunrize.
the class ItemRevolver method getBullet.
/* ------------- BULLET UTILITY ------------- */
EntityRevolvershot getBullet(EntityPlayer player, Vec3d vecSpawn, Vec3d vecDir, String type, ItemStack stack, boolean electro) {
EntityRevolvershot bullet = new EntityRevolvershot(player.world, player, vecDir.x * 1.5, vecDir.y * 1.5, vecDir.z * 1.5, type, stack);
bullet.motionX = vecDir.x * 2;
bullet.motionY = vecDir.y * 2;
bullet.motionZ = vecDir.z * 2;
bullet.bulletElectro = electro;
return bullet;
}
use of blusunrize.immersiveengineering.common.entities.EntityRevolvershot in project ImmersiveEngineering by BluSunrize.
the class TileEntityTurretGun method getBulletEntity.
EntityRevolvershot getBulletEntity(World world, Vec3d vecDir, IBullet type) {
Vec3d gunPos = getGunPosition();
EntityRevolvershot bullet = new EntityRevolvershot(world, gunPos.x + vecDir.x, gunPos.y + vecDir.y, gunPos.z + vecDir.z, 0, 0, 0, type);
bullet.motionX = vecDir.x;
bullet.motionY = vecDir.y;
bullet.motionZ = vecDir.z;
return bullet;
}
Aggregations