feat: add minium stone sounds
This commit is contained in:
parent
a0c12060d1
commit
1cbcee888a
|
@ -3,8 +3,11 @@ package com.pahimar.ee3.handler;
|
||||||
import com.pahimar.ee3.api.event.WorldTransmutationEvent;
|
import com.pahimar.ee3.api.event.WorldTransmutationEvent;
|
||||||
import com.pahimar.ee3.network.PacketHandler;
|
import com.pahimar.ee3.network.PacketHandler;
|
||||||
import com.pahimar.ee3.network.message.MessageSingleParticleEvent;
|
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.Particles;
|
||||||
|
import com.pahimar.ee3.reference.Sounds;
|
||||||
import com.pahimar.ee3.util.TransmutationHelper;
|
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.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import net.minecraft.block.Block;
|
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
|
@SubscribeEvent
|
||||||
|
@ -171,6 +161,18 @@ public class WorldTransmutationHandler {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (result) {
|
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(
|
PacketHandler.INSTANCE.sendToAllAround(
|
||||||
new MessageSingleParticleEvent(
|
new MessageSingleParticleEvent(
|
||||||
Particles.LARGE_EXPLODE,
|
Particles.LARGE_EXPLODE,
|
||||||
|
@ -207,6 +209,16 @@ public class WorldTransmutationHandler {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//event.actionResult = ActionEvent.ActionResult.FAILURE;
|
//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
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue