diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java index 8d21dcee7..6af24dcad 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityAtomicReconstructor.java @@ -18,6 +18,7 @@ import ellpeck.actuallyadditions.items.lens.Lens; import ellpeck.actuallyadditions.items.lens.Lenses; import ellpeck.actuallyadditions.network.PacketHandler; import ellpeck.actuallyadditions.network.PacketParticle; +import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.WorldPos; import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.item.ItemStack; @@ -81,6 +82,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } private void shootLaser(int endX, int endY, int endZ, Lens currentLens){ + this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":reconstructor", 0.35F, 1.0F); PacketHandler.theNetwork.sendToAllAround(new PacketParticle(xCoord, yCoord, zCoord, endX, endY, endZ, currentLens.getColor(), 8, 2F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 64)); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java index b32ab8035..c3b2de648 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java @@ -18,6 +18,7 @@ import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.ItemCoffee; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.network.gui.IButtonReactor; +import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -126,6 +127,10 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements if(!worldObj.isRemote){ if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= WATER_USE){ if(this.storage.getEnergyStored() >= ENERGY_USED){ + if(this.brewTime % 30 == 0){ + this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":coffeeMachine", 0.35F, 1.0F); + } + this.brewTime++; this.storage.extractEnergy(ENERGY_USED, false); if(this.brewTime >= TIME_USED){ diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java index a4dafb506..796a1fe77 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java @@ -16,6 +16,7 @@ import cofh.api.energy.IEnergyReceiver; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry; +import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -97,8 +98,13 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg canCrushOnSecond = this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); } + boolean shouldPlaySound = false; + if(canCrushOnFirst){ if(this.storage.getEnergyStored() >= getEnergyUse(this.isDouble)){ + if(this.firstCrushTime%30 == 0){ + shouldPlaySound = true; + } this.firstCrushTime++; if(this.firstCrushTime >= getMaxCrushTime()){ this.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); @@ -113,6 +119,9 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg if(this.isDouble){ if(canCrushOnSecond){ if(this.storage.getEnergyStored() >= getEnergyUse(this.isDouble)){ + if(this.secondCrushTime%30 == 0){ + shouldPlaySound = true; + } this.secondCrushTime++; if(this.secondCrushTime >= getMaxCrushTime()){ this.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); @@ -147,6 +156,10 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg this.lastFirstCrush = this.firstCrushTime; this.lastSecondCrush = this.secondCrushTime; } + + if(shouldPlaySound){ + this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, ModUtil.MOD_ID_LOWER+":crusher", 0.25F, 1.0F); + } } } diff --git a/src/main/resources/assets/actuallyadditions/sounds.json b/src/main/resources/assets/actuallyadditions/sounds.json index 4d20878b4..3fbd30a78 100644 --- a/src/main/resources/assets/actuallyadditions/sounds.json +++ b/src/main/resources/assets/actuallyadditions/sounds.json @@ -1,3 +1,6 @@ { - "duhDuhDuhDuuuh": { "category": "record", "sounds":["duhDuhDuhDuuuh"] } + "duhDuhDuhDuuuh": { "category": "record", "sounds":["duhDuhDuhDuuuh"] }, + "coffeeMachine": { "category": "block", "sounds":["coffeeMachine"] }, + "reconstructor": { "category": "block", "sounds":["reconstructor"] }, + "crusher": { "category": "block", "sounds":["crusher"] } } \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/sounds/coffeeMachine.ogg b/src/main/resources/assets/actuallyadditions/sounds/coffeeMachine.ogg new file mode 100644 index 000000000..5aafe437c Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/sounds/coffeeMachine.ogg differ diff --git a/src/main/resources/assets/actuallyadditions/sounds/crusher.ogg b/src/main/resources/assets/actuallyadditions/sounds/crusher.ogg new file mode 100644 index 000000000..2d6e74641 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/sounds/crusher.ogg differ diff --git a/src/main/resources/assets/actuallyadditions/sounds/reconstructor.ogg b/src/main/resources/assets/actuallyadditions/sounds/reconstructor.ogg new file mode 100644 index 000000000..7c1c326fe Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/sounds/reconstructor.ogg differ