2013-12-27 23:59:59 +01:00
|
|
|
package appeng.block.solids;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.client.particle.EntityFX;
|
|
|
|
import net.minecraft.world.World;
|
2014-07-07 04:04:58 +02:00
|
|
|
import appeng.client.render.effects.VibrantFX;
|
2014-02-09 06:08:27 +01:00
|
|
|
import appeng.core.AEConfig;
|
2014-07-26 04:52:21 +02:00
|
|
|
import appeng.core.CommonHelper;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.core.features.AEFeature;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
public class BlockQuartzLamp extends BlockQuartzGlass
|
|
|
|
{
|
|
|
|
|
|
|
|
public BlockQuartzLamp() {
|
|
|
|
super( BlockQuartzLamp.class );
|
|
|
|
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
|
2014-02-09 02:34:52 +01:00
|
|
|
setLightLevel( 1.0f );
|
|
|
|
setBlockTextureName( "BlockQuartzGlass" );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public void randomDisplayTick(World w, int x, int y, int z, Random r)
|
|
|
|
{
|
2014-02-09 06:08:27 +01:00
|
|
|
if ( !AEConfig.instance.enableEffects )
|
2013-12-27 23:59:59 +01:00
|
|
|
return;
|
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
|
|
|
{
|
|
|
|
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
|
|
|
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
|
|
|
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-07-07 04:04:58 +02:00
|
|
|
VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
|
|
|
}
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|