ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java
Ellpeck 020745a813 Remember how I said "I'm nearing the end of bugfixing"?
Well that was a lie apparently.
2016-01-07 21:41:28 +01:00

43 lines
1.3 KiB
Java

/*
* This file ("ItemFertilizer.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense/
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2016 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
public class ItemFertilizer extends ItemBase{
public ItemFertilizer(String name){
super(name);
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float par8, float par9, float par10){
if(ItemDye.applyBonemeal(stack, world, pos, player)){
if(!world.isRemote){
world.playAuxSFX(2005, pos, 0);
}
return true;
}
return super.onItemUse(stack, player, world, pos, side, par8, par9, par10);
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.RARE;
}
}