mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +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){
|
if(!world.isRemote){
|
||||||
|
|
||||||
List<ItemStack> drops = getDrops(world, pos, state, 0);
|
List<ItemStack> drops = getDrops(world, pos, state, 0);
|
||||||
|
boolean deductedSeedSize = false;
|
||||||
for(ItemStack stack : drops){
|
for(ItemStack stack : drops){
|
||||||
if(stack != null && stack.getItem() == this.getSeed()){
|
if(stack != null && stack.getItem() == this.seedItem && !deductedSeedSize){
|
||||||
stack.stackSize--;
|
stack.stackSize--;
|
||||||
|
deductedSeedSize = true;
|
||||||
}
|
}
|
||||||
EntityItem entity = new EntityItem(world, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, stack);
|
EntityItem entity = new EntityItem(world, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, stack);
|
||||||
world.spawnEntityInWorld(entity);
|
world.spawnEntityInWorld(entity);
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
//TODO Add meta & nbt info
|
||||||
public class TooltipEvent{
|
public class TooltipEvent{
|
||||||
|
|
||||||
private static final String ADVANCED_INFO_TEXT_PRE = EnumChatFormatting.DARK_GRAY+" ";
|
private static final String ADVANCED_INFO_TEXT_PRE = EnumChatFormatting.DARK_GRAY+" ";
|
||||||
|
|
Loading…
Reference in a new issue