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


Java BlockOre类代码示例

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


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

示例1: isOre

import net.minecraft.block.BlockOre; //导入依赖的package包/类
/**
 * Checks if an ItemStack contains an ore item. This is done by checking the item extends
 * BlockOre, or if the ore dictionary for entries that start with 'ore'. It will also check
 * the display name of the stack to see if it has the word Ore in it.
 *
 * @param stack The ItemStack to check.
 * @param checkName Whether or not the name of the ItemStack should be checked.
 * @return Whether or not the ItemStack is an ore.
 */
public static boolean isOre (@Nonnull ItemStack stack, boolean checkName) {

    if (Block.getBlockFromItem(stack.getItem()) instanceof BlockOre) {
        return true;
    }

    for (final int oreID : OreDictionary.getOreIDs(stack)) {
        if (OreDictionary.getOreName(oreID).startsWith("ore")) {
            return true;
        }
    }

    if (checkName && stack.getItem().getItemStackDisplayName(stack).matches(".*(^|\\s)([oO]re)($|\\s).")) {
        return true;
    }

    return false;
}
 
开发者ID:Darkhax-Minecraft,项目名称:Bookshelf,代码行数:28,代码来源:BlockUtils.java

示例2: onItemUse

import net.minecraft.block.BlockOre; //导入依赖的package包/类
@Override
public boolean onItemUse(ItemStack stack,EntityPlayer player, World world, int x, int y,int z, int par7, float par8, float par9, float par10) {

	if(RpgInventoryMod.playerClass.contains(RpgBaseAddon.CLASSALCHEMIST)){
		Block b = world.getBlock(x, y, z);

		if(b instanceof BlockOre){
			if(b.equals(Blocks.gold_ore))
				return true;

			world.setBlockToAir(x, y, z);
			if(b.equals(Blocks.lapis_ore))
				world.setBlock(x, y, z, Blocks.lapis_block);
			else
				world.setBlock(x, y, z, Blocks.gold_ore);

			world.markBlockForUpdate(x, y, z);
			stack.damageItem(5, player);
		}
	}

	return true;
}
 
开发者ID:ArtixAllMighty,项目名称:rpginventory,代码行数:24,代码来源:ItemSoulSphere.java

示例3: shouldMineBlock

import net.minecraft.block.BlockOre; //导入依赖的package包/类
private boolean shouldMineBlock(Block block, int x, int y, int z) {
    if (block instanceof BlockOre || block instanceof BlockRedstoneOre) {
        InventoryBasic minerInventory = this.miner.inventory;
        if (InventoryUtils.hasRoomInInventory(minerInventory)) {
            return true;
        }
        else {
            World world = this.miner.worldObj;
            ArrayList<ItemStack> items = block.getDrops(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
            for (ItemStack item : items) {
                if (InventoryUtils.canFitItem(item, minerInventory)) {
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:civilframe,项目名称:TameHumans,代码行数:19,代码来源:EntityAIMineOre.java

示例4: onUpdate

import net.minecraft.block.BlockOre; //导入依赖的package包/类
@Override
public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int p_77663_4_, boolean inHand) {
	super.onUpdate(stack,worldIn,entityIn,p_77663_4_,inHand);
	if (inHand && worldIn.getTotalWorldTime() % 10 == 0 && !worldIn.isRemote) {
		boolean found = false;
		int x = (int) entityIn.posX;
		int y = (int) entityIn.posY;
		int z = (int) entityIn.posZ;
		for (int i=x-10;i<x+10;i++) {
			for (int j=z-10;j<z+10;j++) {
				for (int k=y-5;k<y+5;k++) {
					Block b = worldIn.getBlock(i, k, j);
					if ((b instanceof BlockOre || b instanceof DerpyOres || b.getUnlocalizedName().contains("ore"))&&b != GameRegistry.findBlock("minecraft", "coal_ore")) {
						found = true;
					}
				}
			}
		}
		NBTTagCompound tag = stack.getTagCompound();
		if (tag == null) tag = new NBTTagCompound();
		tag.setBoolean("active", found);
		stack.setTagCompound(tag);
	}
}
 
开发者ID:Wuerfel21,项目名称:The-Derpy-Shiz-Mod,代码行数:25,代码来源:WuerfeliumPickaxe.java

示例5: seedMap

import net.minecraft.block.BlockOre; //导入依赖的package包/类
private void seedMap() {
	// Iterate through the blockmap looking for known pattern types.
	// Though they probably should all be registered with Forge
	// dictionary it's not a requirement.
	final Iterator<Block> itr = Block.REGISTRY.iterator();
	while (itr.hasNext()) {
		final Block block = itr.next();
		final String blockName = MCHelper.nameOf(block);
		if (block instanceof BlockCrops) {
			final BlockCrops crop = (BlockCrops) block;
			if (crop.getMaxAge() == 3) {
				this.registerBlocks("#beets", blockName);
			} else if (blockName.equals("minecraft:wheat")) {
				this.registerBlocks("#wheat", blockName);
			} else if (crop.getMaxAge() == 7) {
				this.registerBlocks("#crop", blockName);
			}
		} else if (block instanceof BlockSapling) {
			this.registerBlocks("#sapling", blockName);
		} else if (block instanceof BlockReed) {
			this.registerBlocks("#reed", blockName);
		} else if (block instanceof BlockFence) {
			this.registerBlocks("#fence", blockName);
		} else if (block instanceof BlockFlower || block instanceof BlockMushroom) {
			this.registerBlocks("NOT_EMITTER", blockName);
		} else if (block instanceof BlockLog || block instanceof BlockPlanks) {
			this.registerBlocks("wood", blockName);
		} else if (block instanceof BlockDoor) {
			this.registerBlocks("bluntwood", blockName);
		} else if (block instanceof BlockLeaves) {
			this.registerBlocks("leaves", blockName);
		} else if (block instanceof BlockOre) {
			this.registerBlocks("ore", blockName);
		} else if (block instanceof BlockIce) {
			this.registerBlocks("ice", blockName);
		}
	}
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:39,代码来源:FootstepsRegistry.java

示例6: registerForgeOres

import net.minecraft.block.BlockOre; //导入依赖的package包/类
public static void registerForgeOres(){
    for (String s : OreDictionary.getOreNames()) {
        if (s.contains("ore")){
            OreDictionary.getOres(s).stream().filter(ore -> ore.getItem() instanceof ItemBlock).forEach(ore -> {
                Block block = ((ItemBlock) ore.getItem()).getBlock();
                if (!(block instanceof BlockOre)) {
                    OreUtil.addOre((BlockType) block);
                }
            });
        }
    }
}
 
开发者ID:thomas15v,项目名称:NoXray,代码行数:13,代码来源:OreUtil.java

示例7: isOre

import net.minecraft.block.BlockOre; //导入依赖的package包/类
/**
 * Checks if an ItemStack contains an ore item. This is done by checking the item extends
 * BlockOre, or if the ore dictionary for entries that start with 'ore'. It will also check
 * the display name of the stack to see if it has the word Ore in it.
 * 
 * @param stack The ItemStack to check.
 * @param checkName Whether or not the name of the ItemStack should be checked.
 * @return Whether or not the ItemStack is an ore.
 */
public static boolean isOre (ItemStack stack, boolean checkName) {
    if (stack == null || stack.getItem() == null)
        return false;
    if (Block.getBlockFromItem(stack.getItem()) instanceof BlockOre)
        return true;
    for (final int oreID : OreDictionary.getOreIDs(stack))
        if (OreDictionary.getOreName(oreID).startsWith("ore"))
            return true;
    if (checkName && stack.getItem().getItemStackDisplayName(stack).matches(".*(^|\\s)([oO]re)($|\\s)."))
        return true;
    return false;
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:MMDLib-old,代码行数:22,代码来源:BlockUtils.java

示例8: removeNearBlock

import net.minecraft.block.BlockOre; //导入依赖的package包/类
public void removeNearBlock(World world, BlockPos pos)
{
    if(world.getBlockState(pos).getBlock() instanceof BlockOre)
    {
        world.setBlockToAir(pos);
    }
}
 
开发者ID:elias54,项目名称:Fake-Ores-2,代码行数:8,代码来源:BlockAntiOreStone.java

示例9: caveableBlock

import net.minecraft.block.BlockOre; //导入依赖的package包/类
protected boolean caveableBlock(IBlockState blockstate, IBlockState aboveblockstate) {
	if (aboveblockstate.getBlock().getMaterial() == Material.water) return false;
	
	return 
		blockstate.getBlock() instanceof BlockRock 
		|| blockstate.getBlock() instanceof BlockOre 
		|| blockstate.getBlock() instanceof BlockSubSoil 
		|| blockstate.getBlock() instanceof BlockTopSoil;
	
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:11,代码来源:MapGenCavesVC.java

示例10: generatePillarSupports

import net.minecraft.block.BlockOre; //导入依赖的package包/类
private void generatePillarSupports(World world, Chunk c, int x, int z) {
  if (FysiksFun.settings.worldSupportBlockID <= 0) {
    // System.out.println("warning... worldSupportBlockID: "+FysiksFun.settings.worldSupportBlockID);
    return;
  }

  for (int tries = 0; tries < 4; tries++) {
    int maxY = 10 + FysiksFun.rand.nextInt(92);
    int dx = FysiksFun.rand.nextInt(16);
    int dz = (FysiksFun.rand.nextInt(16) + Counters.tick) % 16;
    int y;
    for (y = 20; y < maxY; y++) {
      int id = c.getBlockID(dx, y, dz);
      if (id == 0) break;
      if (id == Block.dirt.blockID || id == Block.stone.blockID || id == Block.grass.blockID || id == Block.bedrock.blockID) continue;
      if (Block.blocksList[id] == null) {
        FysiksFun.logger.log(Level.SEVERE, "Bad block id=" + id + " found @" + Util.xyzString(x + dx, y, z + dz) + " while generating world supports");
        break;
      }
      if (Block.blocksList[id] instanceof BlockOre) continue;
      break;
    }
    if (y == 20) continue; // This is a flatworld, don't do any pillars

    y = y - FysiksFun.rand.nextInt(6) - 2;
    if (y <= 8) continue;
    for (int tmp = -FysiksFun.rand.nextInt(8); tmp <= 0; tmp++)
      world.setBlock(x + dx, y + tmp, z + dz, FysiksFun.settings.worldSupportBlockID);
    // c.setBlockIDWithMetadata(dx, tmp, dz, Block.bedrock.blockID, 0);
    // System.out.println("Bedrock support @" + Util.xyzString(x + dx,
    // y, z + dz));
  }
}
 
开发者ID:mbrx,项目名称:FysiksFun,代码行数:34,代码来源:WorldSupportGenerator.java

示例11: breaking

import net.minecraft.block.BlockOre; //导入依赖的package包/类
private void breaking(ItemStack stack, BlockPos pos, EntityPlayerMP playermp) {

		World world = playermp.worldObj;
		IBlockState state = world.getBlockState(pos);
		Block block = state.getBlock();

		if (!world.isRemote) {
			if (!world.isAirBlock(pos)) {
				block.onBlockHarvested(world, pos, state, playermp);
				if (block.removedByPlayer(world, pos, playermp, true)) {
					block.onBlockDestroyedByPlayer(world, pos, state);
					if (!playermp.capabilities.isCreativeMode) {
						block.harvestBlock(world, playermp, pos, state, world.getTileEntity(pos));
						block.dropXpOnBlockBreak(world, pos, block.getExpDrop(world, pos, 0));
						stack.damageItem(1, playermp);
					}
				}
				playermp.playerNetServerHandler.sendPacket(new S23PacketBlockChange(world, pos));
			}
		}

		if (block instanceof BlockRedstoneOre || block instanceof BlockOre || blocks.contains(block)) {
			if (playermp.worldObj.getBlockState(pos.up()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.up()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.up()).getBlock())) {
				this.breaking(stack, pos.up(), playermp);
			}
			if (playermp.worldObj.getBlockState(pos.down()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.down()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.down()).getBlock())) {
				this.breaking(stack, pos.down(), playermp);
			}
			if (playermp.worldObj.getBlockState(pos.north()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.north()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.north()).getBlock())) {
				this.breaking(stack, pos.north(), playermp);
			}
			if (playermp.worldObj.getBlockState(pos.south()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.south()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.south()).getBlock())) {
				this.breaking(stack, pos.south(), playermp);
			}
			if (playermp.worldObj.getBlockState(pos.west()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.west()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.west()).getBlock())) {
				this.breaking(stack, pos.west(), playermp);
			}
			if (playermp.worldObj.getBlockState(pos.east()).getBlock() instanceof BlockRedstoneOre || playermp.worldObj.getBlockState(pos.east()).getBlock() instanceof BlockOre || blocks.contains(playermp.worldObj.getBlockState(pos.east()).getBlock())) {
				this.breaking(stack, pos.east(), playermp);
			}
		}
	}
 
开发者ID:HyCraftHD,项目名称:TeambattleMod,代码行数:43,代码来源:ItemTeambattlePickAxe.java

示例12: isOre

import net.minecraft.block.BlockOre; //导入依赖的package包/类
public static boolean isOre(BlockType blockState){
    return blockState instanceof BlockOre | Ores.contains(blockState);
}
 
开发者ID:thomas15v,项目名称:NoXray,代码行数:4,代码来源:OreUtil.java

示例13: preInit

import net.minecraft.block.BlockOre; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	tabAtlantis = new CreativeTabs("tabAtlantis") {public Item getTabIconItem() {return AtlantisMod.pearl;}};
	
	blockAtlantisPortal = (BlockPortal)(new BlockPortal()).setBlockName("blockAtlantisPortal").setBlockTextureName("portal");
	
	blockDeepSand = (new BlockFalling()).setHardness(0.5F).setStepSound(Block.soundTypeSand).setBlockName("blockDeepSand").setCreativeTab(AtlantisMod.tabAtlantis).setBlockTextureName("atlantismod:deep_sand");
	blockRottenPlanks = (new BlockRottenPlanks()).setHardness(1.5F).setStepSound(Block.soundTypeWood).setBlockName("rottenPlanks").setCreativeTab(AtlantisMod.tabAtlantis).setBlockTextureName("atlantismod:rotten_planks");

	pearl = (new Item()).setUnlocalizedName("pearl").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:pearl");
	atlantisWand = (ItemAtlantisWand)(new ItemAtlantisWand()).setUnlocalizedName("atlantisWand").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:portal_wand").setMaxStackSize(1);
	trident = (new ItemTrident(AtlantisMod.Trident)).setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:trident").setUnlocalizedName("trident").setMaxStackSize(1);
	atlantisEye = (new ItemAtlantisEye(2,1.2F,false)).setAlwaysEdible().setUnlocalizedName("atlantisEye").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:atlantis_eye").setMaxStackSize(16);
	scepter = (new Item()).setUnlocalizedName("scepter").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:scepter").setMaxStackSize(1);
	necklace = (ItemNecklaceArmor)(new ItemNecklaceArmor(AtlantisMod.NecklaceArmor,0,1)).setUnlocalizedName("necklace").setMaxDamage(10000).setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:necklace").setMaxStackSize(1);
	bubbleWand = (ItemBubbleWand)(new ItemBubbleWand()).setUnlocalizedName("bubbleWand").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:bubble_wand").setMaxStackSize(1);
	
	fishHead = (new Item()).setUnlocalizedName("fishHead").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:fish_head");
	
	blockPearl = (new BlockCompressed(MapColor.snowColor)).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName("blockPearl").setBlockTextureName("atlantismod:pearl_block").setCreativeTab(AtlantisMod.tabAtlantis);
	oreAtlanteum = (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setBlockName("oreAtlanteum").setBlockTextureName("atlantismod:atlanteum_ore").setCreativeTab(AtlantisMod.tabAtlantis);
	blockAtlanteum = (new BlockCompressed(MapColor.cyanColor)).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName("blockAtlanteum").setBlockTextureName("atlantismod:atlanteum_block").setCreativeTab(AtlantisMod.tabAtlantis);
	
	atlanteum = (new Item()).setUnlocalizedName("atlanteum").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:atlanteum");
	nuggetAtlanteum = (new Item()).setUnlocalizedName("nuggetAtlanteum").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:atlanteum_nugget");
	
	divingHelmet = (ItemDivingArmor)(new ItemDivingArmor(AtlantisMod.DivingSuit,0,0)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("divingHelmet").setTextureName("atlantismod:diving_helmet");
	scubaSuit = (ItemDivingArmor)(new ItemDivingArmor(AtlantisMod.DivingSuit,0,1)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("scubaSuit").setTextureName("atlantismod:scuba_suit");
	oxygenTank = (ItemDivingArmor)(new ItemDivingArmor(AtlantisMod.DivingSuit,0,2)).setMaxDamage(10000).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("oxygenTank").setTextureName("atlantismod:oxygen_tank");
	flippers = (ItemDivingArmor)(new ItemDivingArmor(AtlantisMod.DivingSuit,0,3)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("flippers").setTextureName("atlantismod:flippers");
	
	blockSeaweed = (new BlockSeaweed()).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setBlockName("blockSeaweed").setBlockTextureName("atlantismod:seaweed");
	itemSeaweed = (new ItemSeaweed(AtlantisMod.blockSeaweed)).setUnlocalizedName("itemSeaweed").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:seaweed_item");

	blockCoralOrange = (new BlockCoral(itemCoralOrange)).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setBlockName("blockCoralOrange").setBlockTextureName("atlantismod:orange_coral");
	blockCoralRed = (new BlockCoral(itemCoralRed)).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setBlockName("blockCoralRed").setBlockTextureName("atlantismod:red_coral");
	blockCoralPurple = (new BlockCoral(itemCoralPurple)).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setBlockName("blockCoralPurple").setBlockTextureName("atlantismod:purple_coral");
	blockCoralYellow = (new BlockCoral(itemCoralYellow)).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setBlockName("blockCoralYellow").setBlockTextureName("atlantismod:yellow_coral");
	
	itemCoralOrange = (new ItemSeaweed(AtlantisMod.blockCoralOrange)).setUnlocalizedName("itemCoralOrange").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:orange_coral_item");
	itemCoralRed = (new ItemSeaweed(AtlantisMod.blockCoralRed)).setUnlocalizedName("itemCoralRed").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:red_coral_item");
	itemCoralPurple = (new ItemSeaweed(AtlantisMod.blockCoralPurple)).setUnlocalizedName("itemCoralPurple").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:purple_coral_item");
	itemCoralYellow = (new ItemSeaweed(AtlantisMod.blockCoralYellow)).setUnlocalizedName("itemCoralYellow").setCreativeTab(AtlantisMod.tabAtlantis).setTextureName("atlantismod:yellow_coral_item");
	
	pebble = (new BlockPebble()).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockName("pebble").setCreativeTab(AtlantisMod.tabAtlantis).setBlockTextureName("atlantismod:pebble");
	
	axePearl = (new ItemPearlAxe(AtlantisMod.PearlTool)).setUnlocalizedName("axePearl").setTextureName("atlantismod:pearl_axe").setCreativeTab(AtlantisMod.tabAtlantis);
	pickaxePearl = (new ItemPearlPickaxe(AtlantisMod.PearlTool)).setUnlocalizedName("pickaxePearl").setTextureName("atlantismod:pearl_pickaxe").setCreativeTab(AtlantisMod.tabAtlantis);
	hoePearl = (new ItemHoe(AtlantisMod.PearlTool)).setUnlocalizedName("hoePearl").setTextureName("atlantismod:pearl_hoe").setCreativeTab(AtlantisMod.tabAtlantis);
	shovelPearl = (new ItemSpade(AtlantisMod.PearlTool)).setUnlocalizedName("shovelPearl").setTextureName("atlantismod:pearl_shovel").setCreativeTab(AtlantisMod.tabAtlantis);
	swordPearl = (new ItemSword(AtlantisMod.PearlTool)).setUnlocalizedName("swordPearl").setTextureName("atlantismod:pearl_sword").setCreativeTab(AtlantisMod.tabAtlantis);
	
	axeAtlanteum = (new ItemAtlanteumAxe(AtlantisMod.AtlanteumTool)).setUnlocalizedName("axeAtlanteum").setTextureName("atlantismod:atlanteum_axe").setCreativeTab(AtlantisMod.tabAtlantis);
	pickaxeAtlanteum = (new ItemAtlanteumPickaxe(AtlantisMod.AtlanteumTool)).setUnlocalizedName("pickaxeAtlanteum").setTextureName("atlantismod:atlanteum_pickaxe").setCreativeTab(AtlantisMod.tabAtlantis);
	hoeAtlanteum = (new ItemHoe(AtlantisMod.AtlanteumTool)).setUnlocalizedName("hoeAtlanteum").setTextureName("atlantismod:atlanteum_hoe").setCreativeTab(AtlantisMod.tabAtlantis);
	shovelAtlanteum = (new ItemSpade(AtlantisMod.AtlanteumTool)).setUnlocalizedName("shovelAtlanteum").setTextureName("atlantismod:atlanteum_shovel").setCreativeTab(AtlantisMod.tabAtlantis);
	swordAtlanteum = (new ItemSword(AtlantisMod.AtlanteumTool)).setUnlocalizedName("swordAtlanteum").setTextureName("atlantismod:atlanteum_sword").setCreativeTab(AtlantisMod.tabAtlantis);
	
	helmetAtlanteum = (ItemAtlanteumArmor)(new ItemAtlanteumArmor(AtlantisMod.AtlanteumArmor,0,0)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("helmetAtlanteum").setTextureName("atlantismod:atlanteum_helmet");
	chestAtlanteum = (ItemAtlanteumArmor)(new ItemAtlanteumArmor(AtlantisMod.AtlanteumArmor,0,1)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("chestAtlanteum").setTextureName("atlantismod:atlanteum_chestplate");
	legsAtlanteum = (ItemAtlanteumArmor)(new ItemAtlanteumArmor(AtlantisMod.AtlanteumArmor,0,2)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("legsAtlanteum").setTextureName("atlantismod:atlanteum_leggings");
	bootsAtlanteum = (ItemAtlanteumArmor)(new ItemAtlanteumArmor(AtlantisMod.AtlanteumArmor,0,3)).setCreativeTab(AtlantisMod.tabAtlantis).setMaxStackSize(1).setUnlocalizedName("bootsAtlanteum").setTextureName("atlantismod:atlanteum_boots");
	
	atlantisOcean = (new BiomeGenAtlantisOcean(44)).setBiomeName("Atlantean Ocean").setHeight(new BiomeGenBase.Height(-1.9F, 0.1F));
	coralReef = (new BiomeGenCoralReef(45)).setBiomeName("Coral Reef").setHeight(new BiomeGenBase.Height(-1.9F, 0.1F));
	deepOcean = (new BiomeGenOcean(46)).setBiomeName("Deepest Ocean").setHeight(new BiomeGenBase.Height(-2.0F, 0.1F));
	darkOcean = (new BiomeGenTheDeep(47)).setBiomeName("Dark Ocean").setHeight(new BiomeGenBase.Height(-1.9F, 0.1F));
	
	biomes = new BiomeGenBase[]{AtlantisMod.atlantisOcean,AtlantisMod.coralReef,AtlantisMod.deepOcean};

	blockRottenPlanks.setHarvestLevel("pickaxe", 2);
	blockDeepSand.setHarvestLevel("shovel", 1);
	blockPearl.setHarvestLevel("pickaxe", 2);
	oreAtlanteum.setHarvestLevel("pickaxe", 2);
	blockAtlanteum.setHarvestLevel("pickaxe", 2);
	
	this.doRegister();
}
 
开发者ID:CodecademyMinecraftMods,项目名称:atlantis-mod,代码行数:79,代码来源:AtlantisMod.java

示例14: getBlockColor

import net.minecraft.block.BlockOre; //导入依赖的package包/类
private int getBlockColor(Block block) {
    if (block == null) return 0xff000000;

    if (block instanceof BlockOre) return 0xffff0000;

    return block.getMaterial().getMaterialMapColor().colorValue | 0xff000000;
}
 
开发者ID:SlimeVoid,项目名称:TheMinersFriend,代码行数:8,代码来源:GuiGeologicalEquipment.java


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