From d0e874a7885ccb26dedc825ba562709b997f1576 Mon Sep 17 00:00:00 2001 From: alexbegt Date: Sat, 13 May 2017 14:58:03 -0400 Subject: [PATCH] Pull change from 1.10.2, Fix Nether and Overworld Bookshelves dropping books with the meta of the block and causing the books to have no texture. --- .../bookshelves/BlockNetherBookshelves.java | 16 ++++++++++++++++ .../bookshelves/BlockOverworldBookshelves.java | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java index b38532bf..2a6fc94d 100644 --- a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java +++ b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockNetherBookshelves.java @@ -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. */ @@ -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) { diff --git a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java index 0a3d8c09..5a8da78a 100644 --- a/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java +++ b/src/main/java/com/progwml6/natura/decorative/block/bookshelves/BlockOverworldBookshelves.java @@ -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. */ @@ -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) {