Search in sources :

Example 16 with TagInt

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

the class EntityConverterService method convertSheep.

public void convertSheep(Sheep sheep, TagCompound properties) {
    properties.getCompoundData().put("Color", new TagInt(sheep.getColor().getDyeData()));
    properties.getCompoundData().put("Sheared", new TagByte(sheep.isSheared()));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagByte(de.keyle.knbt.TagByte)

Example 17 with TagInt

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

the class Fire method save.

@Override
public void save(TagCompound tagCompound) {
    tagCompound.getCompoundData().put("addset_chance", new TagString(addChanceRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("chance", new TagInt(Integer.parseInt(chanceInput.getText())));
    tagCompound.getCompoundData().put("addset_duration", new TagString(addTimeRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("duration", new TagInt(Integer.parseInt(timeInput.getText())));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagString(de.keyle.knbt.TagString)

Example 18 with TagInt

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

the class Heal method save.

@Override
public void save(TagCompound tagCompound) {
    tagCompound.getCompoundData().put("addset_time", new TagString(decreaseTimeRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("time", new TagInt(Integer.parseInt(timeInput.getText())));
    tagCompound.getCompoundData().put("addset_hp", new TagString(addHealthRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("hp_double", new TagDouble(Double.parseDouble(healthInput.getText())));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagString(de.keyle.knbt.TagString) TagDouble(de.keyle.knbt.TagDouble)

Example 19 with TagInt

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

the class Lightning method save.

@Override
public void save(TagCompound tagCompound) {
    tagCompound.getCompoundData().put("addset_chance", new TagString(addChanceRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("chance", new TagInt(Integer.parseInt(chanceInput.getText())));
    tagCompound.getCompoundData().put("addset_damage", new TagString(addDamageRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("damage_double", new TagDouble(Double.parseDouble(damageInput.getText())));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagString(de.keyle.knbt.TagString) TagDouble(de.keyle.knbt.TagDouble)

Example 20 with TagInt

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

the class Poison method save.

@Override
public void save(TagCompound tagCompound) {
    tagCompound.getCompoundData().put("addset_chance", new TagString(addChanceRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("chance", new TagInt(Integer.parseInt(chanceInput.getText())));
    tagCompound.getCompoundData().put("addset_duration", new TagString(addTimeRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("duration", new TagInt(Integer.parseInt(timeInput.getText())));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagString(de.keyle.knbt.TagString)

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