Finished Textures, starting sound

This commit is contained in:
StevenRS11
2013-11-06 22:16:56 -05:00
parent 51ee6d9c5e
commit 4a6d166ba5
5 changed files with 74 additions and 26 deletions

View File

@@ -1,6 +1,8 @@
package StevenDimDoors.mod_pocketDim; package StevenDimDoors.mod_pocketDim;
import paulscode.sound.SoundSystem; import paulscode.sound.SoundSystem;
import net.minecraft.client.audio.SoundManager;
import net.minecraft.client.audio.SoundPool;
import net.minecraft.client.audio.SoundPoolEntry; import net.minecraft.client.audio.SoundPoolEntry;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@@ -36,15 +38,15 @@ public class EventHookContainer
@ForgeSubscribe @ForgeSubscribe
public void onSoundLoad(SoundLoadEvent event) public void onSoundLoad(SoundLoadEvent event)
{ {
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/monk.ogg"); event.manager.addSound(mod_pocketDim.modid+":monk.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/crack.ogg"); event.manager.addSound(mod_pocketDim.modid+":crack.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/tearing.ogg"); event.manager.addSound(mod_pocketDim.modid+":tearing.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/rift.ogg"); event.manager.addSound(mod_pocketDim.modid+":rift.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftStart.ogg"); event.manager.addSound(mod_pocketDim.modid+":riftStart.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftEnd.ogg"); event.manager.addSound(mod_pocketDim.modid+":riftEnd.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftClose.ogg"); event.manager.addSound(mod_pocketDim.modid+":riftClose.ogg");
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftDoor.ogg"); event.manager.addSound(mod_pocketDim.modid+":riftDoor.ogg");
event.manager.soundPoolMusic.addSound(mod_pocketDim.modid+":/sfx/creepy.ogg"); event.manager.addMusic(mod_pocketDim.modid+":creepy.ogg");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -93,6 +95,7 @@ public class EventHookContainer
{ {
player.inventory.clearInventory(-1, -1); player.inventory.clearInventory(-1, -1);
} }
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand); ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand);
Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID); Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID);
DDTeleporter.teleportEntity(player, destination, false); DDTeleporter.teleportEntity(player, destination, false);
@@ -118,10 +121,14 @@ public class EventHookContainer
{ {
SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem; SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem;
sndSystem.stop("BgMusic"); sndSystem.stop("BgMusic");
SoundPoolEntry soundPoolEntry = FMLClientHandler.instance().getClient().sndManager.soundPoolMusic.getRandomSoundFromSoundPool("mods.DimDoors.sfx.creepy"); SoundPoolEntry soundPoolEntry = FMLClientHandler.instance().getClient().sndManager.soundPoolMusic.getRandomSoundFromSoundPool(mod_pocketDim.modid+":creepy");
if(soundPoolEntry!=null)
{
sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.getSoundUrl(), soundPoolEntry.getSoundName(), false); sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.getSoundUrl(), soundPoolEntry.getSoundName(), false);
sndSystem.play("LimboMusic"); sndSystem.play("LimboMusic");
} }
}
else if(world.isRemote && !(world.provider instanceof LimboProvider)) else if(world.isRemote && !(world.provider instanceof LimboProvider))
{ {
FMLClientHandler.instance().getClient().sndManager.sndSystem.stop("LimboMusic"); FMLClientHandler.instance().getClient().sndManager.sndSystem.stop("LimboMusic");

View File

@@ -18,6 +18,7 @@ public class CustomSkyProvider extends IRenderHandler
int starGLCallList; int starGLCallList;
int glSkyList; int glSkyList;
int glSkyList2; int glSkyList2;
private static final ResourceLocation locationEndSkyPng = new ResourceLocation("textures/environment/end_sky.png");
public ResourceLocation getMoonRenderPath() public ResourceLocation getMoonRenderPath()
@@ -44,7 +45,7 @@ public class CustomSkyProvider extends IRenderHandler
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
GL11.glDepthMask(false); GL11.glDepthMask(false);
mc.renderEngine.bindTexture(new ResourceLocation("/misc/tunnel.png")); mc.renderEngine.bindTexture((locationEndSkyPng));
if (mc.theWorld.provider.isSurfaceWorld()) if (mc.theWorld.provider.isSurfaceWorld())
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,22 +1,62 @@
{ {
"animation": "animation":
{ {
"frametime": 7, "frametime": 2,
"frames": "frames":
[ [
0,
1,
2,
3,
4,
5,
6,
5,
4,
3,
2,
1,
0 0
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,13
,14
,15
,16
,17
,18
,19
,20
,21
,22
,23
,24
,25
,16
,17
,28
,29
,30
,31
,32
,33
,34
,35
,36
,37
,38
,39
,40
,41
,42
,43
,44
,45
,46
,47
,48
,49
] ]
} }
} }