本文整理汇总了Java中net.minecraftforge.common.EnumPlantType.Beach方法的典型用法代码示例。如果您正苦于以下问题:Java EnumPlantType.Beach方法的具体用法?Java EnumPlantType.Beach怎么用?Java EnumPlantType.Beach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.EnumPlantType
的用法示例。
在下文中一共展示了EnumPlantType.Beach方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canSustainPlant
import net.minecraftforge.common.EnumPlantType; //导入方法依赖的package包/类
public boolean canSustainPlant(final IBlockAccess world, final int x,
final int y, final int z, final ForgeDirection direction,
final IPlantable plantable) {
final EnumPlantType plant = plantable.getPlantType(world, x, y + 1, z);
// Crops or reeds
return plant == EnumPlantType.Crop || plant == EnumPlantType.Beach;
}
示例2: canSustainPlant
import net.minecraftforge.common.EnumPlantType; //导入方法依赖的package包/类
@Override
public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable)
{
boolean hasWater = world.getBlockState(pos.east()).getMaterial() == Material.WATER ||
world.getBlockState(pos.west()).getMaterial() == Material.WATER ||
world.getBlockState(pos.north()).getMaterial() == Material.WATER ||
world.getBlockState(pos.south()).getMaterial() == Material.WATER;
return plantable.getPlantType(world, pos.offset(direction)) == EnumPlantType.Plains ||
plantable.getPlantType(world, pos.offset(direction)) == EnumPlantType.Beach && hasWater;
}
示例3: getPlantType
import net.minecraftforge.common.EnumPlantType; //导入方法依赖的package包/类
@Override
public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
{
return EnumPlantType.Beach;
}
示例4: getPlantType
import net.minecraftforge.common.EnumPlantType; //导入方法依赖的package包/类
@Override
public EnumPlantType getPlantType(World world, int x, int y, int z)
{
return EnumPlantType.Beach;
}
示例5: getPlantType
import net.minecraftforge.common.EnumPlantType; //导入方法依赖的package包/类
@Override
public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos)
{
return EnumPlantType.Beach;
}