Search in sources :

Example 81 with TagInt

use of de.keyle.knbt.TagInt in project MyPet by xXKeyleXx.

the class MyPanda method writeExtendedInfo.

@Override
public TagCompound writeExtendedInfo() {
    TagCompound info = super.writeExtendedInfo();
    info.getCompoundData().put("Baby", new TagByte(isBaby()));
    info.getCompoundData().put("MainGene", new TagInt(getMainGene().ordinal()));
    info.getCompoundData().put("HiddenGene", new TagInt(getHiddenGene().ordinal()));
    return info;
}
Also used : TagInt(de.keyle.knbt.TagInt) TagCompound(de.keyle.knbt.TagCompound) TagByte(de.keyle.knbt.TagByte)

Example 82 with TagInt

use of de.keyle.knbt.TagInt in project MyPet by xXKeyleXx.

the class MyLlama method writeExtendedInfo.

@Override
public TagCompound writeExtendedInfo() {
    TagCompound info = super.writeExtendedInfo();
    info.getCompoundData().put("Variant", new TagInt(getVariant()));
    info.getCompoundData().put("Baby", new TagByte(isBaby()));
    if (hasChest()) {
        info.getCompoundData().put("Chest", MyPetApi.getPlatformHelper().itemStackToCompund(getChest()));
    }
    if (hasDecor()) {
        info.getCompoundData().put("Decor", MyPetApi.getPlatformHelper().itemStackToCompund(getDecor()));
    }
    return info;
}
Also used : TagInt(de.keyle.knbt.TagInt) TagCompound(de.keyle.knbt.TagCompound) TagByte(de.keyle.knbt.TagByte)

Example 83 with TagInt

use of de.keyle.knbt.TagInt in project MyPet by xXKeyleXx.

the class MyMooshroom method writeExtendedInfo.

@Override
public TagCompound writeExtendedInfo() {
    TagCompound info = super.writeExtendedInfo();
    info.getCompoundData().put("Baby", new TagByte(isBaby()));
    info.getCompoundData().put("CowType", new TagInt(getType().ordinal()));
    return info;
}
Also used : TagInt(de.keyle.knbt.TagInt) TagCompound(de.keyle.knbt.TagCompound) TagByte(de.keyle.knbt.TagByte)

Example 84 with TagInt

use of de.keyle.knbt.TagInt in project MyPet by xXKeyleXx.

the class MyFox method writeExtendedInfo.

@Override
public TagCompound writeExtendedInfo() {
    TagCompound info = super.writeExtendedInfo();
    info.getCompoundData().put("FoxType", new TagInt(getType().ordinal()));
    info.getCompoundData().put("Baby", new TagByte(isBaby()));
    if (getEquipment(EquipmentSlot.MainHand) != null && getEquipment(EquipmentSlot.MainHand).getType() != Material.AIR) {
        TagCompound item = MyPetApi.getPlatformHelper().itemStackToCompund(getEquipment(EquipmentSlot.MainHand));
        info.getCompoundData().put("MouthItem", item);
    }
    return info;
}
Also used : TagInt(de.keyle.knbt.TagInt) TagCompound(de.keyle.knbt.TagCompound) TagByte(de.keyle.knbt.TagByte)

Example 85 with TagInt

use of de.keyle.knbt.TagInt in project MyPet by xXKeyleXx.

the class MyCat method writeExtendedInfo.

@Override
public TagCompound writeExtendedInfo() {
    TagCompound info = super.writeExtendedInfo();
    info.getCompoundData().put("CatType", new TagInt(getCatType().ordinal()));
    info.getCompoundData().put("CollarColor", new TagByte(getCollarColor().ordinal()));
    info.getCompoundData().put("Tamed", new TagByte(isTamed()));
    info.getCompoundData().put("Baby", new TagByte(isBaby()));
    return info;
}
Also used : TagInt(de.keyle.knbt.TagInt) TagCompound(de.keyle.knbt.TagCompound) TagByte(de.keyle.knbt.TagByte)

Aggregations

TagInt (de.keyle.knbt.TagInt)98 TagCompound (de.keyle.knbt.TagCompound)57 TagByte (de.keyle.knbt.TagByte)43 ItemStack (org.bukkit.inventory.ItemStack)24 TagList (de.keyle.knbt.TagList)16 TagString (de.keyle.knbt.TagString)13 ArrayList (java.util.ArrayList)10 HashSet (java.util.HashSet)7 TagDouble (de.keyle.knbt.TagDouble)6 EquipmentSlot (de.Keyle.MyPet.api.entity.EquipmentSlot)3 TagByteArray (de.keyle.knbt.TagByteArray)2 TagFloat (de.keyle.knbt.TagFloat)2 TagIntArray (de.keyle.knbt.TagIntArray)2 TagLong (de.keyle.knbt.TagLong)2 TagShort (de.keyle.knbt.TagShort)2 List (java.util.List)2 ByteArrayTag (net.minecraft.nbt.ByteArrayTag)2 ByteTag (net.minecraft.nbt.ByteTag)2 CompoundTag (net.minecraft.nbt.CompoundTag)2 DoubleTag (net.minecraft.nbt.DoubleTag)2