2013-02-26 22:08:43 +01:00
|
|
|
package com.pahimar.ee3.inventory;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.world.WorldSavedData;
|
|
|
|
|
|
|
|
import com.pahimar.ee3.lib.Strings;
|
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
/**
|
|
|
|
* Equivalent-Exchange-3
|
|
|
|
*
|
|
|
|
* WorldSavedDataEE
|
|
|
|
*
|
|
|
|
* @author pahimar
|
|
|
|
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
|
|
|
*
|
|
|
|
*/
|
2013-03-07 03:46:19 +01:00
|
|
|
public class WorldSavedDataEE extends WorldSavedData implements IInventory {
|
2013-02-26 22:08:43 +01:00
|
|
|
|
|
|
|
public UUID uuid;
|
|
|
|
public ItemStack[] inventory;
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
private final int INVENTORY_SIZE = 13 * 4;
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-03-07 03:46:19 +01:00
|
|
|
public WorldSavedDataEE(String filePath) {
|
2013-02-26 22:08:43 +01:00
|
|
|
|
|
|
|
super(filePath);
|
|
|
|
inventory = new ItemStack[INVENTORY_SIZE];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void readFromNBT(NBTTagCompound var1) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void writeToNBT(NBTTagCompound var1) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getSizeInventory() {
|
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
return inventory.length;
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ItemStack getStackInSlot(int slot) {
|
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
return inventory[slot];
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ItemStack decrStackSize(int var1, int var2) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ItemStack getStackInSlotOnClosing(int var1) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setInventorySlotContents(int var1, ItemStack var2) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getInvName() {
|
|
|
|
|
2013-03-07 00:46:19 +01:00
|
|
|
return "worldsaveddata" + "." + Strings.ALCHEMICAL_BAG_NAME;
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getInventoryStackLimit() {
|
|
|
|
|
|
|
|
return 64;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onInventoryChanged() {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isUseableByPlayer(EntityPlayer var1) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void openChest() {
|
2013-03-08 19:40:59 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void closeChest() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
@Override
|
|
|
|
// public boolean hasCustomName()
|
|
|
|
public boolean func_94042_c() {
|
2013-03-05 04:18:15 +01:00
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
return false;
|
|
|
|
}
|
2013-03-05 04:18:15 +01:00
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
@Override
|
2013-03-05 04:18:15 +01:00
|
|
|
// public boolean canInsertSide(int i, ItemStack itemStack)
|
2013-03-08 19:40:59 +01:00
|
|
|
public boolean func_94041_b(int i, ItemStack itemstack) {
|
2013-03-05 04:18:15 +01:00
|
|
|
|
2013-03-08 19:40:59 +01:00
|
|
|
return false;
|
|
|
|
}
|
2013-03-05 04:18:15 +01:00
|
|
|
|
2013-02-26 22:08:43 +01:00
|
|
|
}
|