mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Initial annotations/nullability changes (#3392)
This commit is contained in:
1 parent
1fa0c0c548
commit
9cf74914e7
37 files changed
+172
-104
No files matched your search
@@ -28,6 +28,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fml.common.eventhandler.GenericEvent;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Fired whenever an object with Capabilities support {currently TileEntity/Item/Entity)
|
||||
* is created. Allowing for the attachment of arbitrary capability providers.
|
||||
@@ -126,10 +128,10 @@ public class AttachCapabilitiesEvent<T> extends GenericEvent<T>
|
||||
*/
|
||||
public static class Item extends AttachCapabilitiesEvent<net.minecraft.item.Item>
|
||||
{
|
||||
@Deprecated
|
||||
private final net.minecraft.item.ItemStack stack;
|
||||
@Deprecated
|
||||
private final net.minecraft.item.Item item;
|
||||
public Item(net.minecraft.item.Item item, net.minecraft.item.ItemStack stack)
|
||||
public Item(net.minecraft.item.Item item, @Nonnull net.minecraft.item.ItemStack stack)
|
||||
{
|
||||
super(net.minecraft.item.Item.class, item);
|
||||
this.item = item;
|
||||
@@ -140,6 +142,7 @@ public class AttachCapabilitiesEvent<T> extends GenericEvent<T>
|
||||
{
|
||||
return this.item;
|
||||
}
|
||||
@Nonnull
|
||||
public net.minecraft.item.ItemStack getItemStack()
|
||||
{
|
||||
return this.stack;
|
||||
|
||||
Reference in new issue
Block a user