use of net.minecraftforge.fml.relauncher.SideOnly in project Gaspunk by Ladysnake.
the class ModItems method registerRenders.
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerRenders(ModelRegistryEvent event) {
ModelLoader.setCustomModelResourceLocation(EMPTY_SYRINGE, 0, new ModelResourceLocation(new ResourceLocation("pathos:empty_syringe"), "inventory"));
ModelLoader.setCustomModelResourceLocation(FILLED_SYRINGE, 0, new ModelResourceLocation(new ResourceLocation("pathos:filled_syringe"), "inventory"));
}
use of net.minecraftforge.fml.relauncher.SideOnly in project MorePlanets by SteveKunG.
the class BlockBlackHoleStorage method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityBlackHoleStorage) {
TileEntityBlackHoleStorage storage = (TileEntityBlackHoleStorage) tile;
if (!storage.disableBlackHole) {
for (int i = 0; i < 16; i++) {
double x = pos.getX() + rand.nextFloat() - 0.5D;
double y = pos.getY() + 0.5D;
double z = pos.getZ() + rand.nextFloat();
double motionX = rand.nextDouble() - 0.5D;
double motionZ = rand.nextDouble() - 0.5D;
MorePlanetsCore.PROXY.spawnParticle(EnumParticleTypesMP.DARK_PORTAL, x + 0.5D, y, z, motionX, 1.0D, 0.0D);
MorePlanetsCore.PROXY.spawnParticle(EnumParticleTypesMP.DARK_PORTAL, x + 0.5D, y, z + 0.0D, 0.0D, 1.0D, motionZ);
}
}
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project MorePlanets by SteveKunG.
the class BlockDarkEnergyReceiver method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityDarkEnergyReceiver) {
TileEntityDarkEnergyReceiver dark = (TileEntityDarkEnergyReceiver) tile;
if (dark.activated && !dark.successful) {
for (int i = 0; i < 32; ++i) {
double d0 = pos.getX() + rand.nextFloat();
double d1 = pos.getY() + rand.nextFloat();
double d2 = pos.getZ() + rand.nextFloat();
double d3 = (rand.nextFloat() - 0.5D) * 0.5D;
double d4 = (rand.nextFloat() - 0.5D) * 0.5D;
double d5 = (rand.nextFloat() - 0.5D) * 0.5D;
int j = rand.nextInt(2) * 2 - 1;
d2 = pos.getZ() + 0.5D + 0.25D * j;
d5 = rand.nextFloat() * 2.0F * j;
MorePlanetsCore.PROXY.spawnParticle(EnumParticleTypesMP.DARK_PORTAL, d0, d1, d2, d3, d4, d5);
}
for (int i = 0; i < 32; ++i) {
double d0 = pos.getX() + rand.nextFloat();
double d1 = pos.getY() + rand.nextFloat();
double d2 = pos.getZ() + rand.nextFloat();
double d3 = (rand.nextFloat() - 0.5D) * 0.5D;
double d4 = (rand.nextFloat() - 0.5D) * 0.5D;
double d5 = (rand.nextFloat() - 0.5D) * 0.5D;
int j = rand.nextInt(2) * 2 - 1;
d0 = pos.getX() + 0.5D + 0.25D * j;
d3 = rand.nextFloat() * 2.0F * j;
MorePlanetsCore.PROXY.spawnParticle(EnumParticleTypesMP.DARK_PORTAL, d0, d1, d2, d3, d4, d5);
}
}
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project MorePlanets by SteveKunG.
the class BlockRocketCrusher method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityRocketCrusher) {
TileEntityRocketCrusher tileEntity = (TileEntityRocketCrusher) tile;
ItemStack itemStack = new ItemStack(AsteroidsItems.basicItem, 1, 0);
if (tileEntity.processTicks > 20) {
for (int i = 0; i < 2; i++) {
world.spawnParticle(EnumParticleTypes.ITEM_CRACK, pos.getX() + (double) rand.nextFloat(), pos.getY() + 1.0D, pos.getZ() + (double) rand.nextFloat(), 0.1D * (rand.nextFloat() - 0.5D), 0.2D, (rand.nextFloat() - 0.5D) * 0.1D, new int[] { Item.getIdFromItem(itemStack.getItem()), itemStack.getMetadata() });
}
}
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project MorePlanets by SteveKunG.
the class BlockFluidNuclearWaste method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
if (this.blockMaterial == Material.LAVA && world.getBlockState(pos.up()).getMaterial() == Material.AIR && !world.getBlockState(pos.up()).isOpaqueCube()) {
if (rand.nextInt(50) == 0) {
double d5 = pos.getX() + rand.nextFloat();
double d6 = pos.getY() + state.getBoundingBox(world, pos).maxY;
double d7 = pos.getZ() + rand.nextFloat();
world.playSound(d5, d6, d7, SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
}
if (rand.nextInt(200) == 0) {
world.playSound(pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_LAVA_AMBIENT, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
}
}
if (rand.nextInt(10) == 0 && world.getBlockState(pos.down()).isSideSolid(world, pos.down(), EnumFacing.UP)) {
Material material = world.getBlockState(pos.down(2)).getMaterial();
if (!material.blocksMovement() && !material.isLiquid()) {
double d5 = pos.getX() + rand.nextFloat();
double d6 = pos.getY() - 1.05D;
double d7 = pos.getZ() + rand.nextFloat();
MorePlanetsCore.PROXY.spawnParticle(EnumParticleTypesMP.NUCLEAR_WASTE_DRIP, d5, d6, d7);
}
}
}
Aggregations