feat: add minium stone sounds

This commit is contained in:
LordMZTE 2023-01-08 16:30:30 +01:00
parent a0c12060d1
commit 1cbcee888a
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 25 additions and 13 deletions

View File

@ -3,8 +3,11 @@ package com.pahimar.ee3.handler;
import com.pahimar.ee3.api.event.WorldTransmutationEvent;
import com.pahimar.ee3.network.PacketHandler;
import com.pahimar.ee3.network.message.MessageSingleParticleEvent;
import com.pahimar.ee3.network.message.MessageSoundEvent;
import com.pahimar.ee3.reference.Particles;
import com.pahimar.ee3.reference.Sounds;
import com.pahimar.ee3.util.TransmutationHelper;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
@ -130,19 +133,6 @@ public class WorldTransmutationHandler {
}
}
}
if (anySuccess) {
//PacketDispatcher.sendPacketToAllAround((double)originX, (double)originY,
//(double)originZ, 64.0, ((Entity)thePlayer).worldObj.provider.dimensionId,
//PacketTypeHandler.populatePacket(new
//PacketSoundEvent(thePlayer.field_71092_bJ, "mods.ee3.sound.transmute",
//originX, originY, originZ, 0.5f, 1.0f)));
} else {
//PacketDispatcher.sendPacketToAllAround((double)originX, (double)originY,
//(double)originZ, 64.0, ((Entity)thePlayer).worldObj.provider.dimensionId,
//PacketTypeHandler.populatePacket(new
//PacketSoundEvent(thePlayer.field_71092_bJ, "mods.ee3.sound.fail", originX,
//originY, originZ, 1.5f, 1.5f)));
}
}
@SubscribeEvent
@ -171,6 +161,18 @@ public class WorldTransmutationHandler {
);
}
if (result) {
PacketHandler.INSTANCE.sendToAllAround(
new MessageSoundEvent(
Sounds.TRANSMUTE, event.x, event.y, event.z, 0.5f, 1.0f
),
new TargetPoint(
event.player.worldObj.provider.dimensionId,
event.x,
event.y,
event.z,
32.0
)
);
PacketHandler.INSTANCE.sendToAllAround(
new MessageSingleParticleEvent(
Particles.LARGE_EXPLODE,
@ -207,6 +209,16 @@ public class WorldTransmutationHandler {
}
} else {
//event.actionResult = ActionEvent.ActionResult.FAILURE;
PacketHandler.INSTANCE.sendToAllAround(
new MessageSoundEvent(Sounds.FAIL, event.x, event.y, event.z, 0.5f, 1.0f),
new TargetPoint(
event.player.worldObj.provider.dimensionId,
event.x,
event.y,
event.z,
32.0
)
);
}
}
}