Java Code Examples for net.minecraft.init.Blocks.MELON_STEM

The following are Jave code examples for showing how to use MELON_STEM of the net.minecraft.init.Blocks class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Backmemed   File:   Source Code and License Vote up 6 votes
private static int getStemColorMultiplier(Block p_getStemColorMultiplier_0_, IBlockAccess p_getStemColorMultiplier_1_, BlockPos p_getStemColorMultiplier_2_, RenderEnv p_getStemColorMultiplier_3_)
    CustomColormap customcolormap = stemColors;

    if (p_getStemColorMultiplier_0_ == Blocks.PUMPKIN_STEM && stemPumpkinColors != null)
        customcolormap = stemPumpkinColors;

    if (p_getStemColorMultiplier_0_ == Blocks.MELON_STEM && stemMelonColors != null)
        customcolormap = stemMelonColors;

    if (customcolormap == null)
        return -1;
        int i = p_getStemColorMultiplier_3_.getMetadata();
        return customcolormap.getColor(i);
Example 2
Project: CustomWorldGen   File:   Source Code and License Vote up 6 votes
public net.minecraftforge.common.EnumPlantType getPlantType( world, BlockPos pos)
    if (this == Blocks.WHEAT)          return net.minecraftforge.common.EnumPlantType.Crop;
    if (this == Blocks.CARROTS)        return net.minecraftforge.common.EnumPlantType.Crop;
    if (this == Blocks.POTATOES)       return net.minecraftforge.common.EnumPlantType.Crop;
    if (this == Blocks.MELON_STEM)     return net.minecraftforge.common.EnumPlantType.Crop;
    if (this == Blocks.PUMPKIN_STEM)   return net.minecraftforge.common.EnumPlantType.Crop;
    if (this == Blocks.DEADBUSH)       return net.minecraftforge.common.EnumPlantType.Desert;
    if (this == Blocks.WATERLILY)      return net.minecraftforge.common.EnumPlantType.Water;
    if (this == Blocks.RED_MUSHROOM)   return net.minecraftforge.common.EnumPlantType.Cave;
    if (this == Blocks.BROWN_MUSHROOM) return net.minecraftforge.common.EnumPlantType.Cave;
    if (this == Blocks.NETHER_WART)    return net.minecraftforge.common.EnumPlantType.Nether;
    if (this == Blocks.SAPLING)        return net.minecraftforge.common.EnumPlantType.Plains;
    if (this == Blocks.TALLGRASS)      return net.minecraftforge.common.EnumPlantType.Plains;
    if (this == Blocks.DOUBLE_PLANT)   return net.minecraftforge.common.EnumPlantType.Plains;
    if (this == Blocks.RED_FLOWER)     return net.minecraftforge.common.EnumPlantType.Plains;
    if (this == Blocks.YELLOW_FLOWER)  return net.minecraftforge.common.EnumPlantType.Plains;
    return net.minecraftforge.common.EnumPlantType.Plains;