use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyHorse method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Type", new TagByte(getHorseType()));
info.getCompoundData().put("Variant", new TagInt(getVariant()));
if (hasArmor()) {
info.getCompoundData().put("Armor", MyPetApi.getPlatformHelper().itemStackToCompund(getArmor()));
}
info.getCompoundData().put("Age", new TagInt(getAge()));
if (hasChest()) {
info.getCompoundData().put("Chest", MyPetApi.getPlatformHelper().itemStackToCompund(getChest()));
}
if (hasSaddle()) {
info.getCompoundData().put("Saddle", MyPetApi.getPlatformHelper().itemStackToCompund(getSaddle()));
}
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyHusk method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Baby", new TagByte(isBaby()));
List<TagCompound> itemList = new ArrayList<>();
for (EquipmentSlot slot : EquipmentSlot.values()) {
if (getEquipment(slot) != null) {
TagCompound item = MyPetApi.getPlatformHelper().itemStackToCompund(getEquipment(slot));
item.getCompoundData().put("Slot", new TagInt(slot.getSlotId()));
itemList.add(item);
}
}
info.getCompoundData().put("Equipment", new TagList(itemList));
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyMule method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Baby", new TagByte(isBaby()));
if (hasChest()) {
info.getCompoundData().put("Chest", MyPetApi.getPlatformHelper().itemStackToCompund(getChest()));
}
if (hasSaddle()) {
info.getCompoundData().put("Saddle", MyPetApi.getPlatformHelper().itemStackToCompund(getSaddle()));
}
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyOcelot method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("CatType", new TagInt(getCatType().getId()));
info.getCompoundData().put("Baby", new TagByte(isBaby()));
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyPig method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
if (hasSaddle()) {
info.getCompoundData().put("Saddle", MyPetApi.getPlatformHelper().itemStackToCompund(getSaddle()));
}
info.getCompoundData().put("Baby", new TagByte(isBaby()));
return info;
}
Aggregations