package squeek.veganoption.blocks;

import java.util.Random;
import net.minecraft.block.BlockBed;
import net.minecraft.init.Items;
import net.minecraft.item.Item;

/**
 *  Necessary because Items.bed is hardcoded in BlockBed getItemDropped method
 */
public class BlockBedGeneric extends BlockBed
{
	Item bedItem;

	public BlockBedGeneric()
	{
		super();
		this.bedItem = Items.bed;
	}

	public BlockBed setBedItem(Item item)
	{
		bedItem = item;
		return this;
	}

	@Override
	public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
	{
		return isBlockHeadOfBed(p_149650_1_) ? Item.getItemById(0) : bedItem;
	}
}

@@ -91,16 +91,62 @@
 ockBed;%0A
+import net.minecraft.entity.EntityLivingBase;%0A
 import n
@@ -201,16 +201,57 @@
 em.Item;
+%0Aimport net.minecraft.world.IBlockAccess;
 %0A%0A/**%0A *
@@ -716,11 +716,132 @@
 Item;%0A%09%7D
+%0A%0A%09@Override%0A%09public boolean isBed(IBlockAccess world, int x, int y, int z, EntityLivingBase player)%0A%09%7B%0A%09%09return true;%0A%09%7D
 %0A%7D%0A

Fix beds being unsleepable