當前位置: 首頁>>代碼示例>>Java>>正文


Java Material.GROUND屬性代碼示例

本文整理匯總了Java中net.minecraft.block.material.Material.GROUND屬性的典型用法代碼示例。如果您正苦於以下問題:Java Material.GROUND屬性的具體用法?Java Material.GROUND怎麽用?Java Material.GROUND使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在net.minecraft.block.material.Material的用法示例。


在下文中一共展示了Material.GROUND屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BlockPictureFrameMultiple

public BlockPictureFrameMultiple() {
	super(Material.GROUND);
	this.setUnlocalizedName("pictureframe_multiple");
	this.setHardness(0.5F);
	this.setSoundType(SoundType.WOOD);
	this.setCreativeTab(CreativeTabsLoader.tabMineCamera);
	/*
	 * this.setDefaultState(
	 * this.blockState.getBaseState().withProperty(FACING,
	 * EnumFacing.NORTH).withProperty(ISHEAD, false).withProperty(LINE,
	 * 1).withProperty(COLUMN, 1).withProperty(RENDERTYPE, 0));
	 */
	this.setDefaultState(
			this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(RENDERTYPE, 0));
}
 
開發者ID:PorPit,項目名稱:MineCamera,代碼行數:15,代碼來源:BlockPictureFrameMultiple.java

示例2: BlockPictureFrame

public BlockPictureFrame() {
	super(Material.GROUND);
	this.setUnlocalizedName("pictureframe");
	this.setHardness(0.5F);
	this.setSoundType(SoundType.WOOD);
	this.setCreativeTab(CreativeTabsLoader.tabMineCamera);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)
			.withProperty(STATETYPE, EnumStateType.STANDING));
}
 
開發者ID:PorPit,項目名稱:MineCamera,代碼行數:9,代碼來源:BlockPictureFrame.java

示例3: BlockPhotoProcessor

public BlockPhotoProcessor() {
	super(Material.GROUND);
	this.setUnlocalizedName("photoprocessor");
	this.setHardness(0.5F);
	this.setSoundType(SoundType.ANVIL);
	this.setCreativeTab(CreativeTabsLoader.tabMineCamera);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
}
 
開發者ID:PorPit,項目名稱:MineCamera,代碼行數:8,代碼來源:BlockPhotoProcessor.java

示例4: BlockSample

public BlockSample()
{
    super(Material.GROUND);
    this.setRegistryName(new ResourceLocation(Lib.MODID, "ore_sample"));
    this.setHardness(0.125F);
    this.setResistance(2F);
    this.setSoundType(SoundType.GROUND);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, Types.Modded.HEMATITE));
    this.setUnlocalizedName(this.getRegistryName().toString().replaceAll(":", "."));
    ForgeRegistries.BLOCKS.register(this);
    ForgeRegistries.ITEMS.register(new ItemBlockOre(this));
    MinecraftForge.EVENT_BUS.register(this);
}
 
開發者ID:oitsjustjose,項目名稱:Geolosys,代碼行數:14,代碼來源:BlockSample.java

示例5: BlockSampleVanilla

public BlockSampleVanilla()
{
    super(Material.GROUND);
    this.setRegistryName(new ResourceLocation(Lib.MODID, "ore_sample_vanilla"));
    this.setHardness(0.125F);
    this.setResistance(2F);
    this.setSoundType(SoundType.GROUND);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, Types.Vanilla.COAL));
    this.setUnlocalizedName(this.getRegistryName().toString().replaceAll(":", "."));
    ForgeRegistries.BLOCKS.register(this);
    ForgeRegistries.ITEMS.register(new ItemBlockOre(this));
    MinecraftForge.EVENT_BUS.register(this);
}
 
開發者ID:oitsjustjose,項目名稱:Geolosys,代碼行數:14,代碼來源:BlockSampleVanilla.java

示例6: BlockAshPile

public BlockAshPile(String name,Boolean coke) {
	super(Material.GROUND, name);
	isCoke=coke;
	setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
	setHardness(0.6F);
	setHarvestLevel("shovel", 0);
	setSoundType(SoundType.SAND);
}
 
開發者ID:EnderiumSmith,項目名稱:CharcoalPit,代碼行數:8,代碼來源:BlockAshPile.java

示例7: getDestroySpeed

@Override
public float getDestroySpeed(ItemStack stack, IBlockState state) {
	for (String type : getToolClasses(stack)) {
		if (state.getBlock().isToolEffective(type, state) || state.getMaterial() == Material.GROUND
				|| state.getMaterial() == Material.GRASS || state.getMaterial() == Material.SAND
				|| state.getMaterial() == Material.SNOW || state.getMaterial() == Material.CRAFTED_SNOW
				|| state.getMaterial() == Material.CLAY) {
			return getEfficiency(stack);
		}
	}
	return 1.0F;
}
 
開發者ID:the-realest-stu,項目名稱:Adventurers-Toolbox,代碼行數:12,代碼來源:ItemATShovel.java

示例8: BlockFarmland

protected BlockFarmland()
{
    super(Material.GROUND);
    this.setDefaultState(this.blockState.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)));
    this.setTickRandomly(true);
    this.setLightOpacity(255);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:7,代碼來源:BlockFarmland.java

示例9: getStrVsBlock

@Override
public float getStrVsBlock(ItemStack stack, IBlockState state)
   {
       Material material = state.getMaterial();
       float ret = material != Material.GRASS && material != Material.GROUND && material != Material.CRAFTED_SNOW && material != Material.SNOW && material != Material.SAND && material != Material.CLAY && material != Material.GOURD ? super.getStrVsBlock(stack, state) : this.getStats(stack).getEfficiency();
   	return ret * 0.75F;
   }
 
開發者ID:V0idWa1k3r,項目名稱:ExPetrum,代碼行數:7,代碼來源:ItemGardeningSpade.java

示例10: isSoftGround

public static boolean isSoftGround(World world, BlockPos pos)
{
	Material material = world.getBlockState(pos).getMaterial();
	return (material == Material.GRASS || material == Material.GROUND || material == Material.SAND);
}
 
開發者ID:crazysnailboy,項目名稱:Halloween,代碼行數:5,代碼來源:BlockUtils.java

示例11: BlockGrassPath

protected BlockGrassPath()
{
    super(Material.GROUND);
    this.setLightOpacity(255);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockGrassPath.java

示例12: BlockDirt

protected BlockDirt()
{
    super(Material.GROUND);
    this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, BlockDirt.DirtType.DIRT).withProperty(SNOWY, Boolean.valueOf(false)));
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:BlockDirt.java

示例13: BlockExtension

public BlockExtension() {
	super(Material.GROUND, "block_well_extension");
	setBlockUnbreakable();
	setSoundType(SoundType.METAL);
	setCreativeTab(null);
}
 
開發者ID:cjburkey01,項目名稱:MiningWells,代碼行數:6,代碼來源:BlockExtension.java

示例14: getStrVsBlock

@Override
public float getStrVsBlock(ItemStack stack, IBlockState state)
   {
       Material material = state.getMaterial();
       return material != Material.GRASS && material != Material.GROUND && material != Material.CRAFTED_SNOW && material != Material.SNOW && material != Material.SAND && material != Material.CLAY && material != Material.GOURD ? super.getStrVsBlock(stack, state) : this.getStats(stack).getEfficiency();
   }
 
開發者ID:V0idWa1k3r,項目名稱:ExPetrum,代碼行數:6,代碼來源:ItemShovel.java

示例15: BlockFarmland

public BlockFarmland()
{
	super(Material.GROUND);
	this.initBlock();
}
 
開發者ID:V0idWa1k3r,項目名稱:ExPetrum,代碼行數:5,代碼來源:BlockFarmland.java


注:本文中的net.minecraft.block.material.Material.GROUND屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。