Search in sources :

Example 6 with TagString

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

the class Life method save.

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

Example 7 with TagString

use of de.keyle.knbt.TagString 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 8 with TagString

use of de.keyle.knbt.TagString 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)

Example 9 with TagString

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

the class Ranged method save.

@Override
public void save(TagCompound tagCompound) {
    tagCompound.getCompoundData().put("projectile", new TagString(((String) projectileComboBox.getSelectedItem()).replace(" ", "")));
    tagCompound.getCompoundData().put("addset_damage", new TagString(addDamageRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("damage_double", new TagDouble(Double.parseDouble(damageInput.getText())));
    tagCompound.getCompoundData().put("addset_rateoffire", new TagString(addRateOfFireRadioButton.isSelected() ? "add" : "set"));
    tagCompound.getCompoundData().put("rateoffire", new TagInt(Integer.parseInt(rateOfFireInput.getText())));
}
Also used : TagInt(de.keyle.knbt.TagInt) TagString(de.keyle.knbt.TagString) TagString(de.keyle.knbt.TagString) TagDouble(de.keyle.knbt.TagDouble)

Example 10 with TagString

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

the class Slow 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

TagString (de.keyle.knbt.TagString)20 TagInt (de.keyle.knbt.TagInt)10 TagCompound (de.keyle.knbt.TagCompound)7 TagDouble (de.keyle.knbt.TagDouble)7 TagByte (de.keyle.knbt.TagByte)1 TagList (de.keyle.knbt.TagList)1 JSONObject (org.json.simple.JSONObject)1