Replaced a while(true);
This commit is contained in:
parent
2d3fa08d0d
commit
2484bff229
|
@ -67,16 +67,16 @@ public class UniversalItemContainer : IItemContainer
|
||||||
|
|
||||||
public bool AddItemStack(IItemStack itemStack)
|
public bool AddItemStack(IItemStack itemStack)
|
||||||
{
|
{
|
||||||
while (true)
|
ItemSlotNode? itemSlotNode = Match(itemStack);
|
||||||
|
while (itemSlotNode is not null)
|
||||||
{
|
{
|
||||||
var itemSlotNode = Match(itemStack);
|
|
||||||
|
|
||||||
if (itemSlotNode == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (itemSlotNode.AddItemStack(itemStack))
|
if (itemSlotNode.AddItemStack(itemStack))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
itemSlotNode = Match(itemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetSelectIndex()
|
public int GetSelectIndex()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user