Added hammer sound effect
This commit is contained in:
parent
c206e13794
commit
f067577599
6 changed files with 9 additions and 7 deletions
|
@ -20,7 +20,7 @@ import net.minecraftforge.common.MinecraftForge;
|
|||
import net.minecraftforge.event.Cancelable;
|
||||
import net.minecraftforge.event.Event;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
/**
|
||||
* An event triggered by entities or tiles that create lasers
|
||||
|
@ -266,7 +266,7 @@ public class LaserEvent extends Event
|
|||
items = event.items;
|
||||
for (ItemStack stack : items)
|
||||
{
|
||||
WorldUtility.dropItemStack(world, vec.translate(0.5), stack, false);
|
||||
InventoryUtility.dropItemStack(world, vec.translate(0.5), stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import resonantinduction.api.recipe.MachineRecipes;
|
||||
import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.api.recipe.RecipeUtils.Resource;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.item.ItemRI;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
@ -54,6 +55,7 @@ public class ItemHammer extends ItemRI
|
|||
}
|
||||
}
|
||||
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, Reference.PREFIX + "hammer", 0.5f, 0.8f + (0.2f * world.rand.nextFloat()));
|
||||
player.addExhaustion(1);
|
||||
stack.damageItem(1, player);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SoundHandler
|
|||
{
|
||||
public static final SoundHandler INSTANCE = new SoundHandler();
|
||||
|
||||
public static final String[] SOUND_FILES = { "grinder1.ogg", "grinder2.ogg", "grinder3.ogg", "grinder4.ogg", "electricshock1.ogg", "electricshock2.ogg", "electricshock3.ogg", "electricshock4.ogg", "electricshock5.ogg", "electricshock6.ogg", "electricshock7.ogg" };
|
||||
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" };
|
||||
|
||||
@ForgeSubscribe
|
||||
public void loadSoundEvents(SoundLoadEvent event)
|
||||
|
|
|
@ -26,7 +26,7 @@ import calclavia.lib.network.IPacketReceiverWithID;
|
|||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.prefab.tile.TileElectrical;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
@ -365,7 +365,7 @@ public class TileArmbot extends TileElectrical implements IMultiBlock, IArmbot,
|
|||
if (this.getHeldObject() instanceof ItemStack)
|
||||
{
|
||||
Vector3 handPosition = this.getHandPos();
|
||||
WorldUtility.dropItemStack(worldObj, handPosition, (ItemStack) this.getHeldObject(), false);
|
||||
InventoryUtility.dropItemStack(worldObj, handPosition, (ItemStack) this.getHeldObject());
|
||||
}
|
||||
this.grabbedObject = null;
|
||||
this.sendGrabItemToClient();
|
||||
|
|
|
@ -16,7 +16,7 @@ import resonantinduction.mechanical.fluid.pipe.ItemBlockFluidContainer;
|
|||
import resonantinduction.mechanical.fluid.prefab.BlockFluidNetwork;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.FluidUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -132,7 +132,7 @@ public class BlockTank extends BlockFluidNetwork
|
|||
}
|
||||
else
|
||||
{
|
||||
WorldUtility.dropItemStack(world, new Vector3(x, y, z), dropStack, false);
|
||||
InventoryUtility.dropItemStack(world, new Vector3(x, y, z), dropStack);
|
||||
}
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
|
BIN
src/main/resources/assets/resonantinduction/sound/hammer.ogg
Normal file
BIN
src/main/resources/assets/resonantinduction/sound/hammer.ogg
Normal file
Binary file not shown.
Loading…
Reference in a new issue