mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
Fix plant right-clicking never returned any seeds
This commit is contained in:
parent
6d719f781c
commit
6edab422c4
2 changed files with 4 additions and 1 deletions
|
@ -53,9 +53,11 @@ public class BlockPlant extends BlockCrops{
|
|||
if(!world.isRemote){
|
||||
|
||||
List<ItemStack> drops = getDrops(world, pos, state, 0);
|
||||
boolean deductedSeedSize = false;
|
||||
for(ItemStack stack : drops){
|
||||
if(stack != null && stack.getItem() == this.getSeed()){
|
||||
if(stack != null && stack.getItem() == this.seedItem && !deductedSeedSize){
|
||||
stack.stackSize--;
|
||||
deductedSeedSize = true;
|
||||
}
|
||||
EntityItem entity = new EntityItem(world, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, stack);
|
||||
world.spawnEntityInWorld(entity);
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
|||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
//TODO Add meta & nbt info
|
||||
public class TooltipEvent{
|
||||
|
||||
private static final String ADVANCED_INFO_TEXT_PRE = EnumChatFormatting.DARK_GRAY+" ";
|
||||
|
|
Loading…
Reference in a new issue