Java 类net.minecraft.client.particle.EntityPortalFX 实例源码

项目:OpenTeleporter    文件:PacketTeleporter.java   
@Override
public IMessage onMessage(PacketTeleporter message, MessageContext ctx) {
    if(ctx.side == Side.CLIENT){
        int x = message.x;
        int y = message.y;
        int z = message.z;
        for(int i = 0; i < 500; i++){
            double xx = Math.random()+x;
            double yy = Math.random()*2+y;
            double zz = Math.random()+z;
            Minecraft.getMinecraft().effectRenderer.addEffect(new EntityPortalFX(Minecraft.getMinecraft().theWorld, xx, yy, zz, 0, 0, 0));
        }
    }
    return null;
}
项目:MagicalRings    文件:ProxyClient.java   
@Override
public void specialFXPortal(World world, double x, double y, double z, float r, float g, float b, double motionX, double motionY, double motionZ) {
    EntityPortalFX effect = new EntityPortalFX(world, x, y, z, motionX, motionY, motionZ);
    effect.setRBGColorF(r, g, b);
    mc.effectRenderer.addEffect(effect);
}
项目:ModHearthstone    文件:HearthstoneItem.java   
@SideOnly(Side.CLIENT)
private void spawnParticles(World world, double x, double y, double z) {
    EntityPortalFX effect = new EntityPortalFX(world, x, y, z, 1.0D, 0.0D, 0.0D);
    Minecraft.getMinecraft().effectRenderer.addEffect(effect, null);
}