Search in sources :

Example 1 with PacketSpawnParticle

use of com.builtbroken.mc.core.network.packet.PacketSpawnParticle in project Engine by VoltzEngine-Project.

the class VEProviderShockWave method spawnEffect.

public static void spawnEffect(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float red, float green, float blue, float scale, float distance) {
    PacketSpawnParticle packet = new PacketSpawnParticle("VEP_shockwave", world.provider.dimensionId, x, y, z, motionX, motionY, motionZ);
    packet.otherData = new NBTTagCompound();
    packet.otherData.setFloat("red", red);
    packet.otherData.setFloat("green", green);
    packet.otherData.setFloat("blue", blue);
    packet.otherData.setFloat("scale", scale);
    packet.otherData.setFloat("distance", distance);
    Engine.instance.packetHandler.sendToAllAround(packet, world, x, y, z, 100);
}
Also used : PacketSpawnParticle(com.builtbroken.mc.core.network.packet.PacketSpawnParticle) NBTTagCompound(net.minecraft.nbt.NBTTagCompound)

Example 2 with PacketSpawnParticle

use of com.builtbroken.mc.core.network.packet.PacketSpawnParticle in project Engine by VoltzEngine-Project.

the class CommonProxy method playJsonEffect.

public void playJsonEffect(World world, String key, double x, double y, double z, double mx, double my, double mz, boolean endPoint, NBTTagCompound nbt) {
    if (world != null && !world.isRemote) {
        PacketSpawnParticle packet = new PacketSpawnParticle("JSON_" + key, world.provider.dimensionId, x, y, z, mx, my, mz);
        packet.otherData = nbt;
        packet.endPoint = endPoint;
        Engine.instance.packetHandler.sendToAllAround(packet, world, x, y, z, 100);
    }
}
Also used : PacketSpawnParticle(com.builtbroken.mc.core.network.packet.PacketSpawnParticle)

Aggregations

PacketSpawnParticle (com.builtbroken.mc.core.network.packet.PacketSpawnParticle)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1