mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 22:44:32 +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
@@ -72,8 +72,8 @@ public class InvWrapper implements IItemHandlerModifiable
|
||||
@Nonnull
|
||||
public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate)
|
||||
{
|
||||
if (stack == null)
|
||||
return null;
|
||||
if (stack.func_190926_b())
|
||||
return ItemStack.field_190927_a;
|
||||
|
||||
if (!getInv().isItemValidForSlot(slot, stack))
|
||||
return stack;
|
||||
@@ -98,7 +98,7 @@ public class InvWrapper implements IItemHandlerModifiable
|
||||
getInv().markDirty();
|
||||
}
|
||||
|
||||
return null;
|
||||
return ItemStack.field_190927_a;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -145,7 +145,7 @@ public class InvWrapper implements IItemHandlerModifiable
|
||||
getInv().setInventorySlotContents(slot, stack);
|
||||
getInv().markDirty();
|
||||
}
|
||||
return null;
|
||||
return ItemStack.field_190927_a;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,12 +156,12 @@ public class InvWrapper implements IItemHandlerModifiable
|
||||
public ItemStack extractItem(int slot, int amount, boolean simulate)
|
||||
{
|
||||
if (amount == 0)
|
||||
return null;
|
||||
return ItemStack.field_190927_a;
|
||||
|
||||
ItemStack stackInSlot = getInv().getStackInSlot(slot);
|
||||
|
||||
if (stackInSlot == null)
|
||||
return null;
|
||||
if (stackInSlot.func_190926_b())
|
||||
return ItemStack.field_190927_a;
|
||||
|
||||
if (simulate)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ public class InvWrapper implements IItemHandlerModifiable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStackInSlot(int slot, ItemStack stack)
|
||||
public void setStackInSlot(int slot, @Nonnull ItemStack stack)
|
||||
{
|
||||
getInv().setInventorySlotContents(slot, stack);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class RangedWrapper implements IItemHandlerModifiable {
|
||||
return compose.getStackInSlot(slot + minSlot);
|
||||
}
|
||||
|
||||
return null;
|
||||
return ItemStack.field_190927_a;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,7 +86,7 @@ public class RangedWrapper implements IItemHandlerModifiable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStackInSlot(int slot, ItemStack stack)
|
||||
public void setStackInSlot(int slot, @Nonnull ItemStack stack)
|
||||
{
|
||||
if (checkSlot(slot))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user