mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Re-introduce ItemStack Capabilities (#10362)
Co-authored-by: RealMangoRage <64402114+RealMangorage@users.noreply.github.com> Co-authored-by: LexManos <LexManos@gmail.com>
This commit is contained in:
3 files changed
+193
-1
No files matched your search
@@ -33,6 +33,7 @@ import net.minecraft.world.level.Level;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.ToolAction;
|
||||
import net.minecraftforge.common.ToolActions;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -611,4 +612,12 @@ public interface IForgeItem {
|
||||
default boolean canGrindstoneRepair(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The Default Capability Provider for this item, if any, accounting for the given itemstack.
|
||||
*/
|
||||
@Nullable
|
||||
default ICapabilityProvider getCapabilityProvider(ItemStack stack) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user