use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyPigZombie 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 MyPolarBear method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Baby", new TagByte(isBaby()));
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyVillager method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Profession", new TagInt(getProfession()));
info.getCompoundData().put("Baby", new TagByte(isBaby()));
if (originalData != null) {
info.getCompoundData().put("OriginalData", originalData);
}
return info;
}
use of de.keyle.knbt.TagByte in project MyPet by xXKeyleXx.
the class MyZombie method writeExtendedInfo.
@Override
public TagCompound writeExtendedInfo() {
TagCompound info = super.writeExtendedInfo();
info.getCompoundData().put("Baby", new TagByte(isBaby()));
info.getCompoundData().put("Type", new TagInt(type.ordinal()));
info.getCompoundData().put("Profession", new TagInt(profession));
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 Behavior method save.
@Override
public void save(TagCompound tagCompound) {
tagCompound.getCompoundData().put("friend", new TagByte(friendlyCheckBox.isSelected()));
tagCompound.getCompoundData().put("aggro", new TagByte(aggressiveCheckBox.isSelected()));
tagCompound.getCompoundData().put("farm", new TagByte(farmCheckBox.isSelected()));
tagCompound.getCompoundData().put("raid", new TagByte(raidCheckBox.isSelected()));
tagCompound.getCompoundData().put("duel", new TagByte(duelCheckBox.isSelected()));
}
Aggregations