当前位置: 首页>>代码示例>>Java>>正文


Java BlockFire类代码示例

本文整理汇总了Java中net.minecraft.block.BlockFire的典型用法代码示例。如果您正苦于以下问题:Java BlockFire类的具体用法?Java BlockFire怎么用?Java BlockFire使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BlockFire类属于net.minecraft.block包,在下文中一共展示了BlockFire类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: register

import net.minecraft.block.BlockFire; //导入依赖的package包/类
/**
 * Registers blocks, items, stats, etc.
 */
public static void register()
{
    if (!alreadyRegistered)
    {
        alreadyRegistered = true;

        if (LOGGER.isDebugEnabled())
        {
            redirectOutputToLog();
        }

        Block.registerBlocks();
        BlockFire.init();
        Item.registerItems();
        StatList.init();
        registerDispenserBehaviors();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:Bootstrap.java

示例2: register

import net.minecraft.block.BlockFire; //导入依赖的package包/类
/**
 * Registers blocks, items, stats, etc.
 */
public static void register()
{
    if (!alreadyRegistered)
    {
        alreadyRegistered = true;
        redirectOutputToLog();
        SoundEvent.registerSounds();
        Block.registerBlocks();
        BlockFire.init();
        Potion.registerPotions();
        Enchantment.registerEnchantments();
        Item.registerItems();
        PotionType.registerPotionTypes();
        PotionHelper.init();
        EntityList.init();
        StatList.init();
        Biome.registerBiomes();
        registerDispenserBehaviors();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:24,代码来源:Bootstrap.java

示例3: register

import net.minecraft.block.BlockFire; //导入依赖的package包/类
/**
 * Registers blocks, items, stats, etc.
 */
public static void register()
{
    if (!alreadyRegistered)
    {
        alreadyRegistered = true;

        if (LOGGER.isDebugEnabled())
        {
            redirectOutputToLog();
        }

        SoundEvent.registerSounds();
        Block.registerBlocks();
        BlockFire.init();
        Potion.registerPotions();
        Enchantment.registerEnchantments();
        Item.registerItems();
        PotionType.registerPotionTypes();
        PotionHelper.init();
        StatList.init();
        Biome.registerBiomes();
        registerDispenserBehaviors();
        net.minecraftforge.fml.common.registry.GameData.vanillaSnapshot();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:29,代码来源:Bootstrap.java

示例4: func_149843_e

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public static void func_149843_e()
{
    ((BlockFire) ((BlockFire) BlockLoader.BlockModFire)).func_149842_a(getIdFromBlock(Blocks.planks), 5, 20);
    ((BlockFire) ((BlockFire) BlockLoader.BlockModFire)).func_149842_a(getIdFromBlock(Blocks.double_wooden_slab), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.wooden_slab), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.fence), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.oak_stairs), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.birch_stairs), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.spruce_stairs), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.jungle_stairs), 5, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.log), 5, 5);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.log2), 5, 5);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.leaves), 30, 60);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.leaves2), 30, 60);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.bookshelf), 30, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.tnt), 15, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.tallgrass), 60, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.double_plant), 60, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.yellow_flower), 60, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.red_flower), 60, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.wool), 30, 60);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.vine), 15, 100);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.coal_block), 5, 5);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.hay_block), 60, 20);
    ((BlockFire) BlockLoader.BlockModFire).func_149842_a(getIdFromBlock(Blocks.carpet), 60, 20);
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:27,代码来源:BlockModFire.java

示例5: checkFire

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public void checkFire() {
    if (getColour() != Colourizer.RED) return;

    boolean didThing = false;

    List list = WorldUtils.searchForBlock(worldObj, xCoord, yCoord, zCoord, radius, radius, radius, BlockFire.class);
    for (Object block : list)
        if (block instanceof BlockFire) {
            if (giveRiftEnergy(10) != 0) {          //Fire per tick
                didThing = true;
            }
        }

    if (didThing) {
        IMessage message = new MessageVanillaParticle("lava", xCoord + 0.5, yCoord + 0.6, zCoord + 0.5, 0D, 0.2D, 0D, Math.max(list.size() / 3, 1));
        NetworkHandler.wrapper.sendToDimension(message, worldObj.provider.dimensionId);
    }

    update();
}
 
开发者ID:MSourceCoded,项目名称:Quantum-Anomalies,代码行数:21,代码来源:TileRiftNode.java

示例6: generateCrater

import net.minecraft.block.BlockFire; //导入依赖的package包/类
int generateCrater(double radius, int x, int y, int z, World world)
{

    // delete all blocks in radius 'radius' of (x,y,z)
    for (double x1 = x - radius; x1 < x + radius; x1++)
    {
        for (double y1 = y - radius; y1 < y + radius; y1++)
        {
            for (double z1 = z - radius; z1 < z + radius; z1++)
            {
                double dist = Math.floor(Math.pow(x - x1, 2) + Math.pow(y - y1, 2) + Math.pow(z - z1, 2));

                if (dist <= Math.pow(radius, 2))
                {
                    world.destroyBlock((int) x1, (int) y1, (int) z1, false);
                    if (world.rand.nextInt(2) == 0) world.setBlock((int) x1, (int) y1, (int) z1, BlockFire.fire.blockID);
                }
            }
        }
    }
    // lowest height of the crater
    return (int) (y - radius);
}
 
开发者ID:allout58,项目名称:MinecraftSpaceAgency,代码行数:24,代码来源:GenMeteors.java

示例7: onNeighborBlockChange

import net.minecraft.block.BlockFire; //导入依赖的package包/类
@Override
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
	if (par5 > 0 && Block.blocksList[par5] instanceof BlockFire || par5 > 0 && Block.blocksList[par5].canProvidePower() && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) {
		ClientUtils.mc().thePlayer.sendChatToPlayer("You might want to run, FAST. 6 seconds until detonation.");
		new Thread();
		try {
			Thread.sleep(6000);
			par1World.newExplosion(null, par2, par3, par4, 125.0F, true, true);
			Thread.sleep(6000);
			par1World.setBlockMetadataWithNotify(par2, par3, par4, this.blockID, 0); // ADDED
																						// TWO
																						// ZEROS.
																						// DONT
																						// KNOW
																						// WHAT
																						// THIS
																						// WILL
																						// DO.
		} catch (InterruptedException e) {
			AmitLogger.severe(e, "Caught InterruptedException in Vibranium");
		}
	}
}
 
开发者ID:DrDew2,项目名称:Amitcraft,代码行数:24,代码来源:Vibranium.java

示例8: getActualState

import net.minecraft.block.BlockFire; //导入依赖的package包/类
/**
 * Get the actual Block state of this Block at the given position. This applies properties not visible in the
 * metadata, such as fence connections.
 */
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
    if (!worldIn.getBlockState(pos.down()).isSideSolid(worldIn, pos.down(), EnumFacing.UP) && !((BlockFire) BlockRegistry.specialfire).canCatchFire(worldIn, pos.down(), EnumFacing.UP))
    {
        return state.withProperty(NORTH, this.canCatchFire(worldIn, pos.north(), EnumFacing.SOUTH))
                    .withProperty(EAST,  this.canCatchFire(worldIn, pos.east(), EnumFacing.WEST))
                    .withProperty(SOUTH, this.canCatchFire(worldIn, pos.south(), EnumFacing.NORTH))
                    .withProperty(WEST,  this.canCatchFire(worldIn, pos.west(), EnumFacing.EAST))
                    .withProperty(UPPER, this.canCatchFire(worldIn, pos.up(), EnumFacing.DOWN));
    }
    return this.getDefaultState();
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:Got-Wood,代码行数:17,代码来源:SpecialFire.java

示例9: notifyBlockUpdate

import net.minecraft.block.BlockFire; //导入依赖的package包/类
@Override
public void notifyBlockUpdate(World worldIn, BlockPos pos, IBlockState oldState, IBlockState currentState, int flags) {
	if (currentState.getBlock() == Blocks.FIRE && !(worldIn.getBlockState(pos.down()).getBlock() instanceof BlockObsidian) && !(worldIn.getBlockState(pos.down()).getBlock() instanceof BlockBush) && !(worldIn.getBlockState(pos.down()).getBlock() instanceof BlockTallGrass)) {
		IBlockState newStateBlock = BlockRegistry.specialfire.getDefaultState().withProperty(BlockSpecialFire.AGE, currentState.getValue(BlockFire.AGE)).withProperty(BlockSpecialFire.NORTH, currentState.getValue(BlockFire.NORTH)).withProperty(BlockSpecialFire.EAST, currentState.getValue(BlockFire.EAST)).withProperty(BlockSpecialFire.SOUTH, currentState.getValue(BlockFire.SOUTH)).withProperty(BlockSpecialFire.WEST, currentState.getValue(BlockFire.WEST)).withProperty(BlockSpecialFire.UPPER, currentState.getValue(BlockFire.UPPER));
		worldIn.setBlockState(pos, newStateBlock, flags);
	}
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:Got-Wood,代码行数:8,代码来源:ConsumedByFireListener.java

示例10: CommandFlammable

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public CommandFlammable() {
	Iterator<Block> blocks = Block.REGISTRY.iterator();
	BlockFire fire = Blocks.FIRE;
	
	while (blocks.hasNext()) {
		Block block = blocks.next();
		this.flammables.put(block, new FireInfo(fire.getEncouragement(block), fire.getFlammability(block)));
	}
}
 
开发者ID:MrNobody98,项目名称:morecommands,代码行数:10,代码来源:CommandFlammable.java

示例11: func_151354_b

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public static void func_151354_b()
{
    if (!field_151355_a)
    {
        field_151355_a = true;
        Block.registerBlocks();
        BlockFire.func_149843_e();
        Item.registerItems();
        StatList.func_151178_a();
        func_151353_a();
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:13,代码来源:Bootstrap.java

示例12: tryExtinguishStuff

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public boolean tryExtinguishStuff(World worldIn, BlockPos pos, EntityPlayer playerIn) {
	int extinguishedPlayers = 0;
	double distance = 2.5;
	
	for (int i = 0; i < worldIn.playerEntities.size(); ++i) {
           EntityPlayer entityplayer1 = (EntityPlayer)worldIn.playerEntities.get(i);

           if (entityplayer1.isBurning()) {
               double dist = entityplayer1.getDistanceSq(playerIn.posX, playerIn.posY, playerIn.posZ);
               if (dist < distance * distance) {
               	entityplayer1.extinguish();
               	extinguishedPlayers++;
       			extinguishEffectsAt(worldIn, entityplayer1.posX, entityplayer1.posY + 1, entityplayer1.posZ);
               }
           }
	}
	

	int extinguishedFires = 0;
	for (int dx = -1; dx <= 1; dx++) {
		for (int dy = -1; dy <= 1; dy++) {
			for (int dz = -1; dz <= 1; dz++) {
				if (worldIn.getBlockState(pos.add(dx, dy, dz)).getBlock() instanceof BlockFire) {
					worldIn.setBlockToAir(pos.add(dx, dy, dz));
					extinguishEffectsAt(worldIn, pos.getX() + dx + 0.5f, pos.getY() + dy + 0.5f, pos.getZ() + dz + 0.5f);
					extinguishedFires++;
				}
				
			}
		}
	}
	
	if (extinguishedFires > 0 || extinguishedPlayers > 0) {
		worldIn.playSoundEffect(playerIn.posX, playerIn.posY, playerIn.posZ, "random.fizz", 1f, 1f);
		return true;
	}

	return false;
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:40,代码来源:ItemWoodBucket.java

示例13: assembleNewFireplaceList

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public MessageFireplaceList assembleNewFireplaceList(World w)
{
	MessageFireplaceList m = new MessageFireplaceList();
	m.places = this.placeList.keySet().toArray();
	boolean[] l = new boolean[m.places.length];
	int keyCount = 0;
	for(String nextName : this.placeList.keySet())
	{
		int[] coords = this.placeList.get(nextName);
           BlockPos dest = new BlockPos(coords[0], coords[1], coords[2]);
		Block b = w.getBlockState(dest).getBlock();
           boolean ok;
           if(b instanceof BlockFire)
           {
               ok = ((GreenFlamesBase) FloocraftBase.greenFlamesTemp).isInFireplace(w, dest);
               w.setBlockState(dest, Blocks.FIRE.getDefaultState());
           }
		else
		{
			ok = b instanceof GreenFlamesBase;
		}
           l[keyCount] = ok;
		++keyCount;
	}
	m.enabledList = l;
	return m;
}
 
开发者ID:fredtargaryen,项目名称:Floocraft,代码行数:28,代码来源:FloocraftWorldData.java

示例14: addFlammableBlock

import net.minecraft.block.BlockFire; //导入依赖的package包/类
/**
 * Makes a block burnable by fire.
 * @param block The block that will be set to burn.
 * @param flammability How easily this block catches fire. Higher this is = more likely.
 * @param chanceToNotBurn How likely this block is to be destroyed. Higher this is = less likely it is to be destroyed.
 */
public static final void addFlammableBlock(Block block, int flammability, int chanceToNotBurn)
{
	if (!MCData.isForge)
	{
		ReflectionCallMethods.callMethod(BlockFire.class, "func_149842_a", Block.getIdFromBlock(block), flammability, chanceToNotBurn);
	}
	else
	{
		//Forge compatibility.
		ReflectionCallMethods.callMethod(BlockFire.class, "setFireInfo", block, flammability, chanceToNotBurn);
	}
}
 
开发者ID:Niadel,项目名称:N-API,代码行数:19,代码来源:BlockRegistry.java

示例15: func_78612_b

import net.minecraft.block.BlockFire; //导入依赖的package包/类
public boolean func_78612_b(Block p_78612_1_, int p_78612_2_, int p_78612_3_, int p_78612_4_) {
   int var5 = p_78612_1_.func_71857_b();
   if(var5 == -1) {
      return false;
   } else {
      p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_);
      this.func_83018_a(p_78612_1_);
      return var5 == 0?this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 4?this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 31?this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 1?this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 2?this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 20?this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 11?this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 39?this.func_96445_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 5?this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 13?this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 9?this.func_78586_a((BlockRailBase)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 19?this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 23?this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 6?this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 3?this.func_78590_h((BlockFire)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 8?this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 7?this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 10?this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 27?this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 32?this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 12?this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 29?this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 30?this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 14?this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 15?this.func_78610_x((BlockRedstoneRepeater)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 36?this.func_94176_a((BlockRedstoneLogic)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 37?this.func_94171_a((BlockComparator)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 16?this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false):(var5 == 17?this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true):(var5 == 18?this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 21?this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 24?this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 33?this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 35?this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 25?this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 26?this.func_78567_v((BlockEndPortalFrame)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 28?this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 34?this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 38?this.func_94172_a((BlockHopper)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):false))))))))))))))))))))))))))))))))))))));
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:11,代码来源:RenderBlocks.java


注:本文中的net.minecraft.block.BlockFire类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。