Files
CustomNPC-Plus/src/main/java/noppes/npcs/scripted/ScriptPixelmonPlayerData.java
T

26 lines
806 B
Java
Raw Normal View History

2018-09-13 12:03:28 -04:00
package noppes.npcs.scripted;
import net.minecraft.entity.passive.EntityTameable;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.controllers.PixelmonHelper;
import noppes.npcs.scripted.entity.ScriptPixelmon;
2018-09-13 12:03:28 -04:00
public class ScriptPixelmonPlayerData {
private EntityPlayerMP player;
public ScriptPixelmonPlayerData(EntityPlayerMP player){
this.player = player;
}
public ScriptPixelmon getPartySlot(int slot){
NBTTagCompound compound = PixelmonHelper.getPartySlot(slot, player);
if(compound == null)
return null;
EntityTameable pixelmon = PixelmonHelper.pixelmonFromNBT(compound, player);
return new ScriptPixelmon(pixelmon, compound);
}
public int countPCPixelmon(){
return PixelmonHelper.countPCPixelmon(player);
}
}