本文整理汇总了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();
}