Added gear crank sound
This commit is contained in:
parent
223edc92ec
commit
805dfe3db0
5 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,7 @@ public class SoundHandler
|
|||
{
|
||||
public static final SoundHandler INSTANCE = new SoundHandler();
|
||||
|
||||
public static final String[] SOUND_FILES = { "hammer.ogg", "grinder1.ogg", "grinder2.ogg", "grinder3.ogg", "grinder4.ogg", "electricshock1.ogg", "electricshock2.ogg", "electricshock3.ogg", "electricshock4.ogg", "electricshock5.ogg", "electricshock6.ogg", "electricshock7.ogg", "conveyor.ogg" };
|
||||
public static final String[] SOUND_FILES = { "gearCrank.ogg", "hammer.ogg", "grinder1.ogg", "grinder2.ogg", "grinder3.ogg", "grinder4.ogg", "electricshock1.ogg", "electricshock2.ogg", "electricshock3.ogg", "electricshock4.ogg", "electricshock5.ogg", "electricshock6.ogg", "electricshock7.ogg", "conveyor.ogg" };
|
||||
|
||||
@ForgeSubscribe
|
||||
public void loadSoundEvents(SoundLoadEvent event)
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import resonantinduction.mechanical.network.PartMechanical;
|
||||
|
@ -131,6 +132,8 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
else
|
||||
{
|
||||
getMultiBlock().get().manualCrankTime = 10;
|
||||
world().playSoundEffect(x() + 0.5, y() + 0.5, z() + 0.5, Reference.PREFIX + "gearCrank", 0.5f, 0.9f + world().rand.nextFloat() * 0.2f);
|
||||
player.addExhaustion(0.01f);
|
||||
}
|
||||
|
||||
WrenchUtility.damageWrench(player, player.getCurrentEquippedItem(), x(), y(), z());
|
||||
|
|
|
@ -66,7 +66,7 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
|
|||
{
|
||||
BiomeGenBase biome = worldObj.getBiomeGenForCoords(xCoord, zCoord);
|
||||
boolean hasBonus = biome instanceof BiomeGenOcean || biome instanceof BiomeGenPlains || biome == BiomeGenBase.river;
|
||||
return (long) (worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / 256) * 250 : 0) + (hasBonus ? 80 : 0);
|
||||
return (long) ((worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / 256) * 200 : 0) + (hasBonus ? 80 : 0)) * (worldObj.isRaining() ? 2 : 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
BIN
src/main/resources/assets/resonantinduction/sound/gearCrank.ogg
Normal file
BIN
src/main/resources/assets/resonantinduction/sound/gearCrank.ogg
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Loading…
Add table
Reference in a new issue