mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Pin MCPConfig version
Cleanup and implement BrewingRecipes Delete client command related things Cleanup some biome stuff.
This commit is contained in:
1 parent
f72a7e02e3
commit
a0cef07a0b
22 files changed
+263
-711
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package net.minecraftforge.common.extensions;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/*
|
||||
* Extension added to ItemStack that bounces to ItemSack sensitive Item methods. Typically this is just for convince.
|
||||
*/
|
||||
public interface IForgeItemStack
|
||||
{
|
||||
// Helpers for accessing Item data
|
||||
default ItemStack getStack()
|
||||
{
|
||||
return (ItemStack)this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ItemStack sensitive version of getContainerItem. Returns a full ItemStack
|
||||
* instance of the result.
|
||||
*
|
||||
* @param itemStack The current ItemStack
|
||||
* @return The resulting ItemStack
|
||||
*/
|
||||
default ItemStack getContainerItem()
|
||||
{
|
||||
return getStack().getItem().getContainerItem(getStack());
|
||||
}
|
||||
|
||||
/**
|
||||
* ItemStack sensitive version of hasContainerItem
|
||||
*
|
||||
* @param stack The current item stack
|
||||
* @return True if this item has a 'container'
|
||||
*/
|
||||
default boolean hasContainerItem()
|
||||
{
|
||||
return getStack().getItem().hasContainerItem(getStack());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user