Available Methods
- getTileEntity ( )
- getBlockState ( )
- setBlockState ( )
- getBlock ( )
- setBlockToAir ( )
- getBlockMetadata ( )
- playSound ( )
- isAirBlock ( )
- setBlock ( )
- spawnEntityInWorld ( )
- setBlockMetadataWithNotify ( )
- spawnEntity ( )
- getTotalWorldTime ( )
- spawnParticle ( )
- isBlockLoaded ( )
- getEntitiesWithinAABB ( )
- removeTileEntity ( )
- scheduleBlockUpdate ( )
- getEntitiesWithinAABBExcludingEntity ( )
- playSoundEffect ( )
- getEntityByID ( )
- getLightFromNeighbors ( )
- getChunkProvider ( )
- isBlockModifiable ( )
- getBlockTileEntity ( )
- markBlockForUpdate ( )
- getChunkFromBlockCoords ( )
- getBlockId ( )
- updateComparatorOutputLevel ( )
- destroyBlock ( )
- isAreaLoaded ( )
- scheduleUpdate ( )
- isBlockPowered ( )
- getBiome ( )
- notifyNeighborsOfStateChange ( )
- getActualHeight ( )
- setTileEntity ( )
- getHeight ( )
- getWorld ( )
- notifyBlocksOfNeighborChange ( )
- getChunkFromChunkCoords ( )
- addParticle ( )
- checkNoEntityCollision ( )
- getChunk ( )
- func_147480_a ( )
- loadItemData ( )
- getBlockEntity ( )
- playSoundAtEntity ( )
- doesBlockHaveSolidTopSurface ( )
- getEntitiesInAABBexcluding ( )
- isDaytime ( )
- neighborChanged ( )
- createExplosion ( )
- isBlockIndirectlyGettingPowered ( )
- removeEntity ( )
- rayTraceBlocks ( )
- breakBlock ( )
- checkLight ( )
- getMinecraftServer ( )
- removeBlockEntity ( )
- getTopSolidOrLiquidBlock ( )
- getEntities ( )
- getWorldInfo ( )
- containsAnyLiquid ( )
- playEvent ( )
- addWeatherEffect ( )
- getCelestialAngleRadians ( )
- getFluidState ( )
- func_147453_f ( )
- checkChunksExist ( )
- notifyBlockUpdate ( )
- addImportantParticle ( )
- newExplosion ( )
- isReceivingRedstonePower ( )
- getBlockLightValue ( )
- getBiomeGenForCoords ( )
- setItemData ( )
Related Classes
- java.util.Iterator
- java.util.Random
- java.util.Optional
- javax.annotation.Nullable
- javax.annotation.Nonnull
- org.jetbrains.annotations.NotNull
- net.minecraft.item.ItemStack
- net.minecraft.block.Block
- net.minecraft.client.Minecraft
- net.minecraft.item.Item
- net.minecraft.entity.Entity
- net.minecraft.entity.player.EntityPlayer
- net.minecraft.util.ResourceLocation
- net.minecraft.nbt.NBTTagCompound
- net.minecraft.tileentity.TileEntity
- net.minecraft.init.Blocks
- net.minecraft.block.material.Material
- net.minecraft.entity.EntityLivingBase
- net.minecraft.entity.player.EntityPlayerMP
- net.minecraft.init.Items
- net.minecraft.util.math.BlockPos
- net.minecraft.entity.item.EntityItem
- net.minecraft.world.chunk.Chunk
- net.minecraft.inventory.IInventory
- net.minecraftforge.fml.relauncher.Side
Java Code Examples for net.minecraft.world.World#addWeatherEffect()
The following examples show how to use
net.minecraft.world.World#addWeatherEffect() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LexWand.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void onAltarAction(World world, BlockPos pos) { List<Entity> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AOE.offset(pos)); if (entities.isEmpty()) return; Entity entity = entities.get(world.rand.nextInt(entities.size())); world.getEntitiesWithinAABB(EntityPlayer.class, AOE.grow(6).offset(pos)).forEach((player) -> { player.sendMessage(new TextComponentString(getBanMsg(entity, world.rand))); }); BlockPos entityPos = entity.getPosition(); world.addWeatherEffect(new EntityLightningBolt(world, entityPos.getX(), entityPos.getY(), entityPos.getZ(), false)); }
Example 2
Source File: BlockElectricMushroom.java From AdvancedRocketry with MIT License | 5 votes |
@Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { if(!world.isRemote && Configuration.electricPlantsSpawnLightning && world.isRaining() && world.getBiome(pos) == AdvancedRocketryBiomes.stormLandsBiome) { int lightningX = pos.getX() + rand.nextInt(24) - 12; int lightningZ = pos.getZ() + rand.nextInt(24) - 12; BlockPos lightning = new BlockPos(lightningX, 0, lightningZ ); lightning = world.getTopSolidOrLiquidBlock(lightning); world.addWeatherEffect(new EntityLightningBolt(world, lightning.getX(), lightning.getY(), lightning.getZ(), true)); } }
Example 3
Source File: BlockLightningPlant.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void executeFullGrownEffect(World world, int x, int y, int z, Random rand){ if(!world.isRemote) { int j = MathHelper.floor_double(x) + rand.nextInt(20) - 10; int k = MathHelper.floor_double(z) + rand.nextInt(20) - 10; int l = world.getPrecipitationHeight(j, k); if(world.canLightningStrikeAt(j, l, k)) { EntityLightningBolt lightning = new EntityLightningBolt(world, j, l, k); world.addWeatherEffect(lightning); world.setBlockMetadataWithNotify(x, y, z, 11, 3); } } }
Example 4
Source File: AuraEffects.java From Gadomancy with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void doBlockEffect(ChunkCoordinates originTile, ChunkCoordinates selectedBlock, World world) { int highestY = world.getTopSolidOrLiquidBlock(selectedBlock.posX, selectedBlock.posZ); EntityLightningBolt entityLightning = new EntityLightningBolt(world, selectedBlock.posX + 0.5, highestY, selectedBlock.posZ + 0.5); world.addWeatherEffect(entityLightning); }