use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class BlockCraftingAltar method getAltarMimicBlock.
@SideOnly(Side.CLIENT)
public Block getAltarMimicBlock(IBlockAccess world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if (te == null || !(te instanceof TileEntityCraftingAltar) || !((TileEntityCraftingAltar) te).structureValid())
return this;
Block[] blocks = new Block[4];
blocks[0] = world.getBlock(x - 1, y, z);
blocks[1] = world.getBlock(x + 1, y, z);
blocks[2] = world.getBlock(x, y, z + 1);
blocks[3] = world.getBlock(x, y, z - 1);
if (blocks[0] != Blocks.air && blocks[0] == blocks[1]) {
return blocks[0];
} else if (blocks[2] != Blocks.air && blocks[2] == blocks[3]) {
return blocks[2];
}
return this;
}
use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class BlockDesertNova method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random par5Random) {
if (par5Random.nextInt(10) != 0)
return;
int increment = AMCore.config.getGFXLevel() * 15;
if (increment <= 0)
return;
for (int i = 0; i < 360; i += increment) {
int angle = i;
double posX = x + 0.5 + Math.cos(angle) * 3;
double posZ = z + 0.5 + Math.sin(angle) * 3;
double posY = y + 0.6 + par5Random.nextFloat() * 0.2f;
AMParticle effect = (AMParticle) AMCore.instance.proxy.particleManager.spawn(world, "explosion_2", x + 0.5, posY, z + 0.5);
if (effect != null) {
effect.setIgnoreMaxAge(true);
effect.AddParticleController(new ParticleExpandingCollapsingRingAtPoint(effect, posX, posY, posZ, 0.3, 3, 0.2, 1, false).setExpanding());
// effect.AddParticleController(new ParticleOrbitPoint(effect, x+0.5, y, z+0.5, 1, false).SetTargetDistance(0.35f + par5Random.nextFloat() * 0.2f).SetOrbitSpeed(0.5f).setIgnoreYCoordinate(true));
// effect.AddParticleController(new ParticleFloatUpward(effect, 0, 0.035f, 1, false));
effect.AddParticleController(new ParticleFadeOut(effect, 2, false).setFadeSpeed(0.05f).setKillParticleOnFinish(true));
effect.setParticleScale(0.05f);
}
}
}
use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class BlockEverstone method addHitEffects.
@Override
@SideOnly(Side.CLIENT)
public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) {
TileEntityEverstone everstone = getTE(worldObj, target.blockX, target.blockY, target.blockZ);
AMParticle particle;
Block block;
int blockMeta = 0;
if (everstone == null || everstone.getFacade() == null) {
block = this;
} else {
block = everstone.getFacade();
if (block == null)
block = this;
blockMeta = everstone.getFacadeMeta();
}
effectRenderer.addEffect(new EntityDiggingFX(worldObj, target.blockX + worldObj.rand.nextDouble(), target.blockY + worldObj.rand.nextDouble(), target.blockZ + worldObj.rand.nextDouble(), 0, 0, 0, block, blockMeta, 0));
return true;
}
use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class ItemCrystalPhylactery method getSubItems.
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
par3List.add(new ItemStack(this));
for (String s : spawnableEntities.keySet()) {
ItemStack stack = new ItemStack(this, 1, META_FULL);
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setString("SpawnClassName", s);
stack.stackTagCompound.setFloat("PercentFilled", 100);
par3List.add(stack);
}
}
use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class VinteumTorch method spawnParticle.
@SideOnly(Side.CLIENT)
private void spawnParticle(World world, double x, double y, double z) {
AMParticle effect = (AMParticle) AMCore.instance.proxy.particleManager.spawn(world, "light", x, y, z);
if (effect != null) {
effect.setMaxAge(3);
effect.setIgnoreMaxAge(false);
effect.setRGBColorF(0.69f, 0.89f, 1.0f);
effect.AddParticleController(new ParticleFloatUpward(effect, 0, 0.01f, 1, false));
}
}
Aggregations