v5.4.2 Beta #5
*Fixed GUI offsets with NEI, thanks @Chicken-Bones *Even better sound management. *Better Steel Casing recipe. *Don't specify MC version in update check.
This commit is contained in:
parent
9b34273572
commit
74763663d2
9 changed files with 60 additions and 9 deletions
|
@ -7,4 +7,9 @@ public interface IHasSound
|
|||
* @return sound
|
||||
*/
|
||||
public Sound getSound();
|
||||
|
||||
/**
|
||||
* Removes the sound;
|
||||
*/
|
||||
public void removeSound();
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@ public class SoundHandler
|
|||
/** The PaulsCode SoundSystem */
|
||||
public SoundSystem soundSystem;
|
||||
|
||||
/** All the sound references in the Minecraft game. */
|
||||
public List<Sound> sounds = Collections.synchronizedList(new ArrayList<Sound>());
|
||||
|
||||
/** The current base volume Minecraft is using. */
|
||||
public float masterVolume = 0;
|
||||
|
||||
/** SoundHandler -- a class that handles all Sounds used by Mekanism. */
|
||||
|
@ -37,6 +39,9 @@ public class SoundHandler
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ticks the sound handler. Should be called every Minecraft tick, or 20 times per second.
|
||||
*/
|
||||
public void onTick()
|
||||
{
|
||||
synchronized(sounds)
|
||||
|
@ -53,9 +58,9 @@ public class SoundHandler
|
|||
|
||||
TileEntity tileEntity = FMLClientHandler.instance().getClient().theWorld.getBlockTileEntity(sound.xCoord, sound.yCoord, sound.zCoord);
|
||||
|
||||
if(tileEntity != null && tileEntity instanceof IActiveState && tileEntity instanceof IHasSound)
|
||||
if(tileEntity instanceof IActiveState && tileEntity instanceof IHasSound)
|
||||
{
|
||||
if(((IHasSound)tileEntity).getSound() != sound)
|
||||
if(((IHasSound)tileEntity).getSound().soundPath != sound.soundPath)
|
||||
{
|
||||
soundsToRemove.add(sound);
|
||||
continue;
|
||||
|
@ -82,6 +87,13 @@ public class SoundHandler
|
|||
{
|
||||
System.out.println("[Mekanism] Removed dead sound '" + sound.identifier + ".'");
|
||||
sound.remove();
|
||||
|
||||
TileEntity tileEntity = FMLClientHandler.instance().getClient().theWorld.getBlockTileEntity(sound.xCoord, sound.yCoord, sound.zCoord);
|
||||
|
||||
if(tileEntity instanceof IHasSound)
|
||||
{
|
||||
((IHasSound)tileEntity).removeSound();
|
||||
}
|
||||
}
|
||||
|
||||
masterVolume = FMLClientHandler.instance().getClient().gameSettings.soundVolume;
|
||||
|
@ -116,7 +128,7 @@ public class SoundHandler
|
|||
{
|
||||
synchronized(sounds)
|
||||
{
|
||||
return "Mekanism_" + sounds.size()+1 + "_" + new Random().nextInt(10000);
|
||||
return "Mekanism_" + sounds.size() + "_" + new Random().nextInt(10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -307,10 +307,7 @@ public class Mekanism
|
|||
"IAI", "PPP", "IAI", Character.valueOf('I'), Item.ingotIron, Character.valueOf('A'), EnrichedAlloy, Character.valueOf('P'), "dustOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 9), new Object[] {
|
||||
"SRS", "RPR", "SRS", Character.valueOf('S'), "ingotSteel", Character.valueOf('R'), Item.redstone, Character.valueOf('P'), "ingotOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 9), new Object[] {
|
||||
"RSR", "SPS", "RSR", Character.valueOf('S'), "ingotSteel", Character.valueOf('R'), Item.redstone, Character.valueOf('P'), "ingotOsmium"
|
||||
" S ", "SPS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('P'), "ingotOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MachineBlock, 1, 10), new Object[] {
|
||||
"SCS", "GIG", "SCS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), ControlCircuit, Character.valueOf('G'), Block.glass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 9)
|
||||
|
|
|
@ -59,7 +59,7 @@ public final class MekanismUtils
|
|||
if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1)
|
||||
{
|
||||
entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------");
|
||||
entityplayer.addChatMessage(EnumColor.GREY + " Using outdated version " + EnumColor.DARK_GREY + Mekanism.versionNumber + EnumColor.GREY + " for Minecraft 1.4.6/7.");
|
||||
entityplayer.addChatMessage(EnumColor.GREY + " Using outdated version " + EnumColor.DARK_GREY + Mekanism.versionNumber + EnumColor.GREY + " for your client.");
|
||||
entityplayer.addChatMessage(EnumColor.GREY + " Consider updating to version " + EnumColor.DARK_GREY + Mekanism.latestVersionNumber);
|
||||
entityplayer.addChatMessage(EnumColor.GREY + " New features: " + EnumColor.INDIGO + Mekanism.recentNews);
|
||||
entityplayer.addChatMessage(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------");
|
||||
|
|
|
@ -417,4 +417,10 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
{
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSound()
|
||||
{
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -667,4 +667,10 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IEnerg
|
|||
{
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSound()
|
||||
{
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -616,6 +616,12 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSound()
|
||||
{
|
||||
audio = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrientation()
|
||||
{
|
||||
|
|
|
@ -375,4 +375,10 @@ public abstract class TileEntityGenerator extends TileEntityElectricBlock implem
|
|||
{
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSound()
|
||||
{
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package mekanism.nei;
|
||||
|
||||
import mekanism.client.GuiCombiner;
|
||||
import mekanism.client.GuiCrusher;
|
||||
import mekanism.client.GuiEnrichmentChamber;
|
||||
import mekanism.client.GuiMetallurgicInfuser;
|
||||
import mekanism.client.GuiOsmiumCompressor;
|
||||
import mekanism.client.GuiPurificationChamber;
|
||||
import mekanism.common.Mekanism;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
|
@ -24,6 +30,13 @@ public class NEIMekanismConfig implements IConfigureNEI
|
|||
API.registerRecipeHandler(new FactoryRecipeHandler());
|
||||
API.registerUsageHandler(new FactoryRecipeHandler());
|
||||
|
||||
API.setGuiOffset(GuiEnrichmentChamber.class, 16, 5);
|
||||
API.setGuiOffset(GuiOsmiumCompressor.class, 16, 5);
|
||||
API.setGuiOffset(GuiCrusher.class, 16, 5);
|
||||
API.setGuiOffset(GuiCombiner.class, 16, 5);
|
||||
API.setGuiOffset(GuiPurificationChamber.class, 16, 5);
|
||||
API.setGuiOffset(GuiMetallurgicInfuser.class, 5, 15);
|
||||
|
||||
API.hideItem(Mekanism.boundingBlockID);
|
||||
}
|
||||
|
||||
|
@ -36,6 +49,6 @@ public class NEIMekanismConfig implements IConfigureNEI
|
|||
@Override
|
||||
public String getVersion()
|
||||
{
|
||||
return "1.0.2";
|
||||
return "1.0.3";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue