Added sounds JSON file

This commit is contained in:
Calclavia 2015-01-03 20:10:03 +08:00
parent fb351666f6
commit 1ee6b29590
28 changed files with 12 additions and 4 deletions

View file

@ -0,0 +1,8 @@
{
"hammer": {
"category": "ambient",
"sounds": [
"hammer"
]
}
}

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View file

@ -64,10 +64,10 @@ class TileWorkbench extends TileInventory(Material.rock) with TPacketSender with
if (!world.isRemote)
{
//Try output resource
def tryOutput(name: String): Boolean =
def tryOutput(name: String, probability: Float): Boolean =
{
val outputs = MachineRecipes.instance.getOutput(name, oreName)
if (outputs != null && outputs.length > 0 && world.rand.nextFloat < 0.15)
if (outputs != null && outputs.length > 0 && world.rand.nextFloat < probability)
{
outputs.map(_.getItemStack.copy()).foreach(s => InventoryUtility.dropItemStack(world, new Vector3(player), s, 0))
inputStack.stackSize -= 1
@ -77,8 +77,8 @@ class TileWorkbench extends TileInventory(Material.rock) with TPacketSender with
return false
}
if (!tryOutput(RecipeType.CRUSHER.name))
tryOutput(RecipeType.GRINDER.name)
if (!tryOutput(RecipeType.CRUSHER.name, 0.1f))
tryOutput(RecipeType.GRINDER.name, 0.05f)
}
ResonantInduction.proxy.renderBlockParticle(world, new Vector3(x + 0.5, y + 0.5, z + 0.5), new Vector3((Math.random - 0.5f) * 3, (Math.random - 0.5f) * 3, (Math.random - 0.5f) * 3), Item.getIdFromItem(inputStack.getItem), 1)