mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fix glow panel placement, fixed damage displays (again), start work on new inventory system
This commit is contained in:
1 parent
2aad738c3d
commit
fa7b9b49bc
14 files changed
+70
-27
No files matched your search
@@ -90,7 +90,7 @@ public final class InventoryUtils
|
||||
|
||||
ItemStack inSlot = inventory.getStackInSlot(i);
|
||||
|
||||
if(inSlot == null)
|
||||
if(inSlot == null || inSlot.isEmpty())
|
||||
{
|
||||
if(toInsert.getCount() <= inventory.getInventoryStackLimit())
|
||||
{
|
||||
@@ -170,7 +170,7 @@ public final class InventoryUtils
|
||||
|
||||
ItemStack inSlot = inventory.getStackInSlot(slotID);
|
||||
|
||||
if(inSlot == null)
|
||||
if(inSlot == null || inSlot.isEmpty())
|
||||
{
|
||||
if(toInsert.getCount() <= inventory.getInventoryStackLimit())
|
||||
{
|
||||
@@ -443,7 +443,7 @@ public final class InventoryUtils
|
||||
|
||||
ItemStack inSlot = inventory.getStackInSlot(i);
|
||||
|
||||
if(inSlot == null)
|
||||
if(inSlot == null || inSlot.isEmpty())
|
||||
{
|
||||
if(itemStack.getCount() <= inventory.getInventoryStackLimit())
|
||||
{
|
||||
@@ -502,7 +502,7 @@ public final class InventoryUtils
|
||||
|
||||
ItemStack inSlot = inventory.getStackInSlot(slotID);
|
||||
|
||||
if(inSlot == null)
|
||||
if(inSlot == null || inSlot.isEmpty())
|
||||
{
|
||||
if(itemStack.getCount() <= inventory.getInventoryStackLimit())
|
||||
{
|
||||
@@ -550,6 +550,7 @@ public final class InventoryUtils
|
||||
/*TODO From CCLib -- go back to that version when we're using dependencies again*/
|
||||
public static boolean canStack(ItemStack stack1, ItemStack stack2) {
|
||||
return stack1 == null || stack2 == null ||
|
||||
stack1.isEmpty() || stack2.isEmpty() ||
|
||||
(stack1.getItem() == stack2.getItem() &&
|
||||
(!stack2.getHasSubtypes() || stack2.getItemDamage() == stack1.getItemDamage()) &&
|
||||
ItemStack.areItemStackTagsEqual(stack2, stack1)) &&
|
||||
|
||||
Reference in new issue
Block a user