本文整理匯總了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));
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例8: BlockFarmland
protected BlockFarmland()
{
super(Material.GROUND);
this.setDefaultState(this.blockState.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)));
this.setTickRandomly(true);
this.setLightOpacity(255);
}
示例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;
}
示例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);
}
示例11: BlockGrassPath
protected BlockGrassPath()
{
super(Material.GROUND);
this.setLightOpacity(255);
}
示例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);
}
示例13: BlockExtension
public BlockExtension() {
super(Material.GROUND, "block_well_extension");
setBlockUnbreakable();
setSoundType(SoundType.METAL);
setCreativeTab(null);
}
示例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();
}
示例15: BlockFarmland
public BlockFarmland()
{
super(Material.GROUND);
this.initBlock();
}