mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Added meteorite falling sound.
This commit is contained in:
parent
bd8ed4920d
commit
59ace7eaf5
@ -12,11 +12,16 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
|
||||
public class EntityMeteor extends Entity {
|
||||
|
||||
public boolean safe = false;
|
||||
|
||||
// Audio
|
||||
private boolean soundStarted = false;
|
||||
private AudioWrapper audioFly;
|
||||
|
||||
public EntityMeteor(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
this.ignoreFrustumCheck = true;
|
||||
@ -57,6 +62,12 @@ public class EntityMeteor extends Entity {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if(!soundStarted) {
|
||||
this.audioFly = MainRegistry.proxy.getLoopedSound("hbm:entity.meteoriteFallingLoop", (int)this.posX, 5000, (int)this.posZ, 1F, 150F, 1F, 2);
|
||||
this.audioFly.startSound();
|
||||
|
||||
soundStarted = true;
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && !WorldConfig.enableMeteorStrikes) {
|
||||
this.setDead();
|
||||
@ -72,9 +83,12 @@ public class EntityMeteor extends Entity {
|
||||
motionY = -2.5;
|
||||
|
||||
this.moveEntity(motionX, motionY, motionZ);
|
||||
this.audioFly.updatePosition((int)this.posX, (int)this.posY, (int)this.posZ);
|
||||
this.audioFly.keepAlive();
|
||||
|
||||
if(!this.worldObj.isRemote && this.posY < 260) {
|
||||
if(destroyWeakBlocks(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 6) && this.onGround) {
|
||||
this.audioFly.stopSound();
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5 + rand.nextFloat(), !safe);
|
||||
if(WorldConfig.enableMeteorTails) {
|
||||
ExplosionLarge.spawnParticles(worldObj, posX, posY + 5, posZ, 75);
|
||||
|
||||
@ -135,14 +135,14 @@ public class Meteorite {
|
||||
switch(rand.nextInt(3)) {
|
||||
case 0:
|
||||
generateLarge(world, rand, x, y, z);
|
||||
world.createExplosion(null, x + 0.5, y + 1.5, z + 0.5, 9F, !safe);
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 5F, !safe);
|
||||
break;
|
||||
case 1:
|
||||
world.createExplosion(null, x + 0.5, y + 1.5, z + 0.5, 6F, !safe);
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 4F, !safe);
|
||||
generateMedium(world, rand, x, y, z);
|
||||
break;
|
||||
case 2:
|
||||
world.createExplosion(null, x + 0.5, y + 1.5, z + 0.5, 5F, !safe);
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 2F, !safe);
|
||||
generateSmall(world, rand, x, y, z);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -328,6 +328,8 @@
|
||||
"entity.siegeIdle": {"category": "hostile", "sounds": ["entity/siegeIdle1"]},
|
||||
"entity.siegeHurt": {"category": "hostile", "sounds": ["entity/siegeHurt1", "entity/siegeHurt2"]},
|
||||
"entity.siegeDeath": {"category": "hostile", "sounds": ["entity/siegeDeath1", "entity/siegeDeath2", "entity/siegeDeath3"]},
|
||||
"entity.meteoriteFallingLoop": {"category": "block", "sounds": ["entity/meteoriteFallingLoop"]},
|
||||
|
||||
|
||||
"step.metal": {"category": "player", "sounds": [{"name": "footsteps/metal", "stream": false}]},
|
||||
"step.iron_jump": {"category": "player", "sounds": [{"name": "footsteps/iron_jump", "stream": false}]},
|
||||
|
||||
Binary file not shown.
27
vlc-log.txt
Normal file
27
vlc-log.txt
Normal file
@ -0,0 +1,27 @@
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module started --
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module started --
|
||||
-- logger module started --
|
||||
-- logger module stopped --
|
||||
-- logger module started --
|
||||
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
|
||||
-- logger module stopped --
|
||||
Loading…
x
Reference in New Issue
Block a user