use of de.keyle.knbt.TagString in project MyPet by xXKeyleXx.
the class Stomp 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", new TagDouble(Double.parseDouble(damageInput.getText())));
}
use of de.keyle.knbt.TagString in project MyPet by xXKeyleXx.
the class Behavior method save.
public TagCompound save() {
TagCompound nbtTagCompound = new TagCompound();
nbtTagCompound.getCompoundData().put("Mode", new TagString(behavior.name()));
return nbtTagCompound;
}
use of de.keyle.knbt.TagString in project MyPet by xXKeyleXx.
the class SkullMeta method applyTo.
public void applyTo(TagCompound tag) {
if (hasOwner()) {
TagCompound ownerTag = new TagCompound();
ownerTag.put("Name", new TagString(getOwner()));
if (hasTexture()) {
TagCompound propertiesTag = new TagCompound();
TagList textureList = new TagList();
TagCompound textureTag = new TagCompound();
JSONObject jsonObject = new JSONObject();
JSONObject texturesObject = new JSONObject();
JSONObject skinObject = new JSONObject();
jsonObject.put("textures", texturesObject);
texturesObject.put("SKIN", skinObject);
skinObject.put("url", getTexture());
String base64 = BaseEncoding.base64Url().encode(jsonObject.toJSONString().getBytes());
textureTag.put("Value", new TagString(base64));
textureList.addTag(textureTag);
propertiesTag.put("textures", textureList);
ownerTag.put("Properties", propertiesTag);
}
tag.put("SkullOwner", ownerTag);
}
}
use of de.keyle.knbt.TagString in project MyPet by xXKeyleXx.
the class Damage method save.
@Override
public void save(TagCompound tagCompound) {
tagCompound.getCompoundData().put("addset_damage", new TagString(addDamageRadioButton.isSelected() ? "add" : "set"));
tagCompound.getCompoundData().put("damage_double", new TagDouble(Double.parseDouble(damageInput.getText())));
}
use of de.keyle.knbt.TagString in project MyPet by xXKeyleXx.
the class Knockback 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())));
}
Aggregations