use of mods.railcraft.common.util.network.PacketEffect in project Railcraft by Railcraft.
the class CommonEffectProxy method fireSparkEffect.
@Override
public void fireSparkEffect(World world, Vec3d start, Vec3d end) {
if (Game.isClient(world))
return;
try {
PacketEffect pkt = new PacketEffect(Effect.FIRESPARK);
RailcraftOutputStream data = pkt.getOutputStream();
data.writeVec3d(start);
data.writeVec3d(end);
pkt.sendPacket(world, start);
} catch (IOException ignored) {
}
}
use of mods.railcraft.common.util.network.PacketEffect in project Railcraft by Railcraft.
the class CommonEffectProxy method teleportEffect.
@Override
public void teleportEffect(Entity entity, Vec3d destination) {
if (Game.isClient(entity.worldObj))
return;
try {
PacketEffect pkt = new PacketEffect(Effect.TELEPORT);
RailcraftOutputStream data = pkt.getOutputStream();
data.writeVec3d(entity.getPositionVector());
data.writeVec3d(destination);
pkt.sendPacket(entity.worldObj, entity.getPositionVector());
} catch (IOException ignored) {
}
SoundHelper.playSoundAtEntity(entity, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.BLOCKS, 0.25F, 1.0F);
}
use of mods.railcraft.common.util.network.PacketEffect in project Railcraft by Railcraft.
the class CommonEffectProxy method zapEffectDeath.
@Override
public void zapEffectDeath(World world, Object source) {
if (Game.isClient(world))
return;
try {
PacketEffect pkt = new PacketEffect(Effect.ZAP_DEATH);
RailcraftOutputStream data = pkt.getOutputStream();
EffectManager.IEffectSource es = EffectManager.getEffectSource(source);
data.writeVec3d(es.getPosF());
pkt.sendPacket(world, es.getPosF());
} catch (IOException ignored) {
}
}
use of mods.railcraft.common.util.network.PacketEffect in project Railcraft by Railcraft.
the class CommonEffectProxy method forceTrackSpawnEffect.
@Override
public void forceTrackSpawnEffect(World world, BlockPos pos) {
if (Game.isClient(world))
return;
try {
PacketEffect pkt = new PacketEffect(Effect.FORCE_SPAWN);
RailcraftOutputStream data = pkt.getOutputStream();
data.writeBlockPos(pos);
pkt.sendPacket(world, pos);
} catch (IOException ignored) {
}
SoundHelper.playSound(world, null, pos, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.BLOCKS, 0.25F, 1.0F);
}
Aggregations