Skip to content

Commit

Permalink
Pull change from 1.10.2, Fix Nether and Overworld Bookshelves droppin…
Browse files Browse the repository at this point in the history
…g books with the meta of the block and causing the books to have no texture.
  • Loading branch information
alexbegt committed May 13, 2017
1 parent a415520 commit d0e874a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Expand Up @@ -30,6 +30,16 @@ public BlockNetherBookshelves()
this.setCreativeTab(NaturaRegistry.tabDecorative);
}

/**
* Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It
* returns the metadata of the dropped item based on the old metadata of the block.
*/
@Override
public int damageDropped(IBlockState state)
{
return 0;
}

/**
* Returns the quantity of items to drop on block destruction.
*/
Expand All @@ -49,6 +59,12 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune)
return Items.BOOK;
}

/**
* Determines the amount of enchanting power this block can provide to an enchanting table.
* @param world The World
* @param pos Block position in world
* @return The amount of enchanting power this block produces.
*/
@Override
public float getEnchantPowerBonus(World world, BlockPos pos)
{
Expand Down
Expand Up @@ -30,6 +30,16 @@ public BlockOverworldBookshelves()
this.setCreativeTab(NaturaRegistry.tabDecorative);
}

/**
* Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It
* returns the metadata of the dropped item based on the old metadata of the block.
*/
@Override
public int damageDropped(IBlockState state)
{
return 0;
}

/**
* Returns the quantity of items to drop on block destruction.
*/
Expand All @@ -49,6 +59,12 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune)
return Items.BOOK;
}

/**
* Determines the amount of enchanting power this block can provide to an enchanting table.
* @param world The World
* @param pos Block position in world
* @return The amount of enchanting power this block produces.
*/
@Override
public float getEnchantPowerBonus(World world, BlockPos pos)
{
Expand Down

0 comments on commit d0e874a

Please sign in to comment.