Forward ItemBlock#addInformation to Block#addInformation

This commit is contained in:
Shadowfacts 2016-03-31 21:12:17 -04:00
parent 42e4d1fa77
commit b7327e6a35
2 changed files with 19 additions and 2 deletions

View file

@ -201,7 +201,7 @@
}
@SideOnly(Side.CLIENT)
@@ -844,6 +866,1168 @@
@@ -844,6 +866,1179 @@
return "Block{" + field_149771_c.func_177774_c(this) + "}";
}
@ -1365,6 +1365,17 @@
+ if (delegate.getResourceName() != null) return delegate.getResourceName().toString();
+ 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 ======================================*/
+
public static void func_149671_p()

View file

@ -27,7 +27,7 @@
{
p_179222_3_ = EnumFacing.UP;
}
@@ -159,4 +151,26 @@
@@ -159,4 +151,32 @@
{
return this.field_150939_a;
}
@ -52,5 +52,11 @@
+ }
+
+ 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);
+ }
}