finished sounds

This commit is contained in:
StevenRS11
2013-05-27 22:45:21 -04:00
parent 0e9918f9fe
commit 9ad4dda324
7 changed files with 46 additions and 23 deletions

View File

@@ -43,6 +43,7 @@ public class EventHookContainer
event.manager.soundPoolSounds.addSound("mods/DimensionalDoors/sounds/Monolith.ogg", (mod_pocketDim.class.getResource("/mods/DimensionalDoors/sounds/Monolith.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimensionalDoors/sounds/Monolith.ogg", (mod_pocketDim.class.getResource("/mods/DimensionalDoors/sounds/Monolith.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimensionalDoors/sounds/wylkermaxcrack.ogg", (mod_pocketDim.class.getResource("/mods/DimensionalDoors/sounds/wylkermaxcrack.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimensionalDoors/sounds/wylkermaxcrack.ogg", (mod_pocketDim.class.getResource("/mods/DimensionalDoors/sounds/wylkermaxcrack.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimensionalDoors/sounds/tearing.ogg", (mod_pocketDim.class.getResource("/mods/DimensionalDoors/sounds/tearing.ogg")));
} }

View File

@@ -80,6 +80,7 @@ public class TileEntityRift extends TileEntity
worldObj.spawnEntityInWorld(creeper); worldObj.spawnEntityInWorld(creeper);
} }
/**
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId)!=null) if(dimHelper.dimList.get(this.worldObj.provider.dimensionId)!=null)
{ {
ArrayList rifts = dimHelper.dimList.get(this.worldObj.provider.dimensionId).findRiftsInRange(worldObj, 6, this.xCoord, this.yCoord, this.zCoord); ArrayList rifts = dimHelper.dimList.get(this.worldObj.provider.dimensionId).findRiftsInRange(worldObj, 6, this.xCoord, this.yCoord, this.zCoord);
@@ -89,7 +90,9 @@ public class TileEntityRift extends TileEntity
creeper.setLocationAndAngles(this.xCoord+.5, yCoordHelper.getFirstUncovered(this.worldObj, this.xCoord, this.yCoord, this.zCoord), this.zCoord+.5, 5, 6); creeper.setLocationAndAngles(this.xCoord+.5, yCoordHelper.getFirstUncovered(this.worldObj, this.xCoord, this.yCoord, this.zCoord), this.zCoord+.5, 5, 6);
worldObj.spawnEntityInWorld(creeper); worldObj.spawnEntityInWorld(creeper);
} }
} }
**/
} }

View File

@@ -420,10 +420,10 @@ public class mod_pocketDim
GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimDoor"); GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimDoor");
GameRegistry.registerTileEntity(TileEntityRift.class, "TileEntityRift"); GameRegistry.registerTileEntity(TileEntityRift.class, "TileEntityRift");
EntityRegistry.registerModEntity(MobObelisk.class, "Obelisk", this.obeliskID, this,50, 1, true); EntityRegistry.registerModEntity(MobObelisk.class, "Obelisk", this.obeliskID, this,70, 1, true);
EntityList.IDtoClassMapping.put(this.obeliskID, MobObelisk.class); EntityList.IDtoClassMapping.put(this.obeliskID, MobObelisk.class);
EntityList.entityEggs.put(this.obeliskID, new EntityEggInfo(this.obeliskID, 0, 0xffffff)); EntityList.entityEggs.put(this.obeliskID, new EntityEggInfo(this.obeliskID, 0, 0xffffff));
LanguageRegistry.instance().addStringLocalization("entity.MobObelisk.Obelisk.name", "Obelisk"); LanguageRegistry.instance().addStringLocalization("entity.DimensionalDoors.Obelisk.name", "Monolith");

View File

@@ -119,7 +119,7 @@ public class MobObelisk extends EntityFlying implements IMob
EntityPlayer entityPlayer = this.worldObj.getClosestPlayerToEntity(this, 25); EntityPlayer entityPlayer = this.worldObj.getClosestPlayerToEntity(this, 30);
if(entityPlayer != null) if(entityPlayer != null)
{ {
@@ -133,10 +133,8 @@ public class MobObelisk extends EntityFlying implements IMob
{ {
if(soundTime<=0) if(soundTime<=0)
{ {
if(this.worldObj.isRemote) this.playSound("mods.DimensionalDoors.sounds.Monolith", 1F, 1F);
{
FMLClientHandler.instance().getClient().sndManager.playEntitySound("mods.DimensionalDoors.sounds.Monolith", this, 1, 1, false);
}
soundTime=100; soundTime=100;
} }
if(aggro<470) if(aggro<470)
@@ -156,41 +154,46 @@ public class MobObelisk extends EntityFlying implements IMob
} }
if(this.worldObj.provider instanceof pocketProvider) if(this.worldObj.provider instanceof pocketProvider)
{
if(rand.nextBoolean())
{ {
aggro++; aggro++;
if(aggro==455)
{
FMLClientHandler.instance().getClient().sndManager.playSoundFX("mods.DimensionalDoors.sounds.wylkermaxcrack", 12, 1);
} }
else if(rand.nextBoolean())
{
aggro++; aggro++;
if(aggro==455) }
{
FMLClientHandler.instance().getClient().sndManager.playSoundFX("mods.DimensionalDoors.sounds.wylkermaxcrack", 12, 1);
} }
} if(aggro>445)
if(aggro>455&&aggro<460)
{ {
FMLClientHandler.instance().getClient().sndManager.playSoundFX("mods.DimensionalDoors.sounds.wylkermaxcrack", 12, 1); this.worldObj.playSoundAtEntity(entityPlayer,"mods.DimensionalDoors.sounds.tearing",6, 1);
} }
} }
else else
{ {
if(this.worldObj.isRemote)
{ this.worldObj.playSoundAtEntity(entityPlayer,"mods.DimensionalDoors.sounds.wylkermaxcrack",13, 1);
FMLClientHandler.instance().getClient().sndManager.stopEntitySound(this);
}
LinkData link = new LinkData(this.worldObj.provider.dimensionId, mod_pocketDim.limboDimID, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.posX+rand.nextInt(500)-250, (int)this.posY+500, (int)this.posZ+rand.nextInt(500)-250, false,0); LinkData link = new LinkData(this.worldObj.provider.dimensionId, mod_pocketDim.limboDimID, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.posX+rand.nextInt(500)-250, (int)this.posY+500, (int)this.posZ+rand.nextInt(500)-250, false,0);
dimHelper.instance.teleportToPocket(worldObj, link, entityPlayer); dimHelper.instance.teleportToPocket(worldObj, link, entityPlayer);
entityPlayer.worldObj.playSoundAtEntity(entityPlayer,"mods.DimensionalDoors.sounds.wylkermaxcrack",13, 1);
} }
for (int i = 0; i < -1+this.textureState/2; ++i) for (int i = 0; i < -1+this.textureState/3; ++i)
{ {
entityPlayer.worldObj.spawnParticle("portal", entityPlayer.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, entityPlayer.posY + this.rand.nextDouble() * (double)entityPlayer.height - 0.75D, entityPlayer.posZ + (this.rand.nextDouble() - 0.5D) * (double)entityPlayer.width, (this.rand.nextDouble() - 0.5D) * 2.0D, -this.rand.nextDouble(), (this.rand.nextDouble() - 0.5D) * 2.0D); entityPlayer.worldObj.spawnParticle("portal", entityPlayer.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, entityPlayer.posY + this.rand.nextDouble() * (double)entityPlayer.height - 0.75D, entityPlayer.posZ + (this.rand.nextDouble() - 0.5D) * (double)entityPlayer.width, (this.rand.nextDouble() - 0.5D) * 2.0D, -this.rand.nextDouble(), (this.rand.nextDouble() - 0.5D) * 2.0D);
} }
@@ -198,6 +201,17 @@ public class MobObelisk extends EntityFlying implements IMob
} }
else
{
if(aggro>0)
{
if(rand.nextInt(10)==0)
{
aggro--;
}
}
}
} }
@@ -210,6 +224,11 @@ public class MobObelisk extends EntityFlying implements IMob
if(aggro>0) if(aggro>0)
{ {
aggro--; aggro--;
if(rand.nextBoolean())
{
aggro--;
}
} }
} }
if(soundTime>0) if(soundTime>0)

Binary file not shown.