mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-17 02:55:10 +00:00
Cleaned, refactored and documented inventory package
This commit is contained in:
1 parent
6a8a453496
commit
3d64337681
6 files changed
+166
-31
No files matched your search
@@ -4,6 +4,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Creates a copy of an IInventory for extended simulation
|
||||
*/
|
||||
public class InventoryCopy implements IInventory
|
||||
{
|
||||
public boolean[] accessible;
|
||||
@@ -33,11 +36,11 @@ public class InventoryCopy implements IInventory
|
||||
int lslot = access.lastSlot();
|
||||
if(lslot > accessible.length)
|
||||
{
|
||||
boolean[] l_accessable = new boolean[lslot];
|
||||
boolean[] l_accessible = new boolean[lslot];
|
||||
ItemStack[] l_items = new ItemStack[lslot];
|
||||
System.arraycopy(accessible, 0, l_accessable, 0, accessible.length);
|
||||
System.arraycopy(accessible, 0, l_accessible, 0, accessible.length);
|
||||
System.arraycopy(items, 0, l_items, 0, items.length);
|
||||
accessible = l_accessable;
|
||||
accessible = l_accessible;
|
||||
items = l_items;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user