mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 05:54:41 +00:00
Added Item.onDroppedByPlayer hook
This commit is contained in:
1 parent
d1909d30ac
commit
663ed58610
4 files changed
+76
-12
No files matched your search
@@ -77,7 +77,7 @@
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
||||
{
|
||||
return false;
|
||||
@@ -414,6 +456,12 @@
|
||||
@@ -414,6 +456,26 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,20 @@
|
||||
+ public void addCreativeItems(ArrayList itemList)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when a player drops the item into the world,
|
||||
+ * returning false from this will prevent the item from
|
||||
+ * being removed from the players inventory and spawning
|
||||
+ * in the world
|
||||
+ *
|
||||
+ * @param player The player that dropped the item
|
||||
+ * @param item The item stack, before the item is removed.
|
||||
+ */
|
||||
+ public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
static
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user