Merge pull request #2678 from shadowfacts/BlockAddInfo-19

Forward ItemBlock#addInformation to Block#addInformation
This commit is contained in:
LexManos 2016-03-31 19:04:58 -07:00
commit 74a0709356
2 changed files with 19 additions and 2 deletions

View File

@ -201,7 +201,7 @@
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -844,6 +866,1168 @@ @@ -844,6 +866,1179 @@
return "Block{" + field_149771_c.func_177774_c(this) + "}"; return "Block{" + field_149771_c.func_177774_c(this) + "}";
} }
@ -1365,6 +1365,17 @@
+ if (delegate.getResourceName() != null) return delegate.getResourceName().toString(); + if (delegate.getResourceName() != null) return delegate.getResourceName().toString();
+ return registryName != null ? registryName.toString() : null; + return registryName != null ? registryName.toString() : null;
+ } + }
+
+ /**
+ * Add information to the blocks tooltip, called from the default implementation of {@link ItemBlock#addInformation(ItemStack, EntityPlayer, List, boolean)}
+ * @param stack The stack the tooltip is being retrieved for
+ * @param player The player retrieving the tooltip
+ * @param tooltip The lines to be displayed on the tooltip
+ * @param advanced If the client has advanced debug tooltips enabled
+ */
+ public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
+ {
+ }
+ /* ========================================= FORGE END ======================================*/ + /* ========================================= FORGE END ======================================*/
+ +
public static void func_149671_p() public static void func_149671_p()

View File

@ -27,7 +27,7 @@
{ {
p_179222_3_ = EnumFacing.UP; p_179222_3_ = EnumFacing.UP;
} }
@@ -159,4 +151,26 @@ @@ -159,4 +151,32 @@
{ {
return this.field_150939_a; return this.field_150939_a;
} }
@ -52,5 +52,11 @@
+ } + }
+ +
+ return true; + return true;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void func_77624_a(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
+ {
+ field_150939_a.addInformation(stack, playerIn, tooltip, advanced);
+ } + }
} }