Search in sources :

Example 6 with IAgriGrowthStage

use of com.infinityraider.agricraft.api.v1.crop.IAgriGrowthStage in project AgriCraft by AgriCraft.

the class TileEntityCropBase method rake.

@Override
public boolean rake(@Nonnull Consumer<ItemStack> consumer, @Nullable LivingEntity entity) {
    if (this.getWorld() == null || this.getWorld().isRemote()) {
        return false;
    }
    IAgriWeed weed = this.getWeeds();
    if (weed.isWeed()) {
        IAgriGrowthStage stage = this.getWeedGrowthStage();
        this.setWeed(NO_WEED, NO_GROWTH);
        weed.onRake(stage, consumer, this.getRandom(), entity);
        return true;
    }
    return false;
}
Also used : IAgriWeed(com.infinityraider.agricraft.api.v1.plant.IAgriWeed) IAgriGrowthStage(com.infinityraider.agricraft.api.v1.crop.IAgriGrowthStage)

Aggregations

IAgriGrowthStage (com.infinityraider.agricraft.api.v1.crop.IAgriGrowthStage)5 ImmutableList (com.google.common.collect.ImmutableList)2 IAgriPlant (com.infinityraider.agricraft.api.v1.plant.IAgriPlant)2 IAgriGrowthRequirement (com.infinityraider.agricraft.api.v1.requirement.IAgriGrowthRequirement)2 Nonnull (javax.annotation.Nonnull)2 AbstractBlock (net.minecraft.block.AbstractBlock)2 ItemStack (net.minecraft.item.ItemStack)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 Maps (com.google.common.collect.Maps)1 AgriCraft (com.infinityraider.agricraft.AgriCraft)1 AgriApi (com.infinityraider.agricraft.api.v1.AgriApi)1 IAgriCrop (com.infinityraider.agricraft.api.v1.crop.IAgriCrop)1 IAgriPlantProvider (com.infinityraider.agricraft.api.v1.plant.IAgriPlantProvider)1 IAgriWeed (com.infinityraider.agricraft.api.v1.plant.IAgriWeed)1 AgriSeason (com.infinityraider.agricraft.api.v1.requirement.AgriSeason)1 IAgriSoil (com.infinityraider.agricraft.api.v1.requirement.IAgriSoil)1 AgriItemRegistry (com.infinityraider.agricraft.content.AgriItemRegistry)1 AgriToolTips (com.infinityraider.agricraft.reference.AgriToolTips)1 IRenderUtilities (com.infinityraider.infinitylib.render.IRenderUtilities)1 ITessellator (com.infinityraider.infinitylib.render.tessellation.ITessellator)1