Search in sources :

Example 1 with TagString

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

the class EggIconService method updateIcon.

@Override
public void updateIcon(MyPetType type, IconMenuItem icon) {
    icon.setMaterial(Material.MONSTER_EGG);
    TagCompound entityTag = new TagCompound();
    switch(type) {
        case Bat:
            entityTag.put("id", new TagString("minecraft:bat"));
            break;
        case Blaze:
            entityTag.put("id", new TagString("minecraft:blaze"));
            break;
        case CaveSpider:
            entityTag.put("id", new TagString("minecraft:cave_spider"));
            break;
        case Chicken:
            entityTag.put("id", new TagString("minecraft:chicken"));
            break;
        case Cow:
            entityTag.put("id", new TagString("minecraft:cow"));
            break;
        case Creeper:
            entityTag.put("id", new TagString("minecraft:creeper"));
            break;
        case EnderDragon:
            entityTag.put("id", new TagString("minecraft:ender_dragon"));
            break;
        case Enderman:
            entityTag.put("id", new TagString("minecraft:enderman"));
            break;
        case Endermite:
            entityTag.put("id", new TagString("minecraft:endermite"));
            break;
        case Evoker:
            entityTag.put("id", new TagString("minecraft:evocation_illager"));
            break;
        case Ghast:
            entityTag.put("id", new TagString("minecraft:ghast"));
            break;
        case Giant:
            entityTag.put("id", new TagString("minecraft:giant"));
            break;
        case Guardian:
            entityTag.put("id", new TagString("minecraft:guardian"));
            break;
        case ElderGuardian:
            entityTag.put("id", new TagString("minecraft:elder_guardian"));
            break;
        case Horse:
            entityTag.put("id", new TagString("minecraft:horse"));
            break;
        case Donkey:
            entityTag.put("id", new TagString("minecraft:donkey"));
            break;
        case Mule:
            entityTag.put("id", new TagString("minecraft:mule"));
            break;
        case SkeletonHorse:
            entityTag.put("id", new TagString("minecraft:skeleton_horse"));
            break;
        case ZombieHorse:
            entityTag.put("id", new TagString("minecraft:zombie_horse"));
            break;
        case Illusioner:
            entityTag.put("id", new TagString("minecraft:squid"));
            icon.setGlowing(true);
            break;
        case IronGolem:
            entityTag.put("id", new TagString("minecraft:skeleton"));
            icon.setGlowing(true);
            break;
        case Llama:
            entityTag.put("id", new TagString("minecraft:llama"));
            break;
        case MagmaCube:
            entityTag.put("id", new TagString("minecraft:magma_cube"));
            break;
        case Mooshroom:
            entityTag.put("id", new TagString("minecraft:mooshroom"));
            break;
        case Ocelot:
            entityTag.put("id", new TagString("minecraft:ocelot"));
            break;
        case Parrot:
            entityTag.put("id", new TagString("minecraft:parrot"));
            break;
        case Pig:
            entityTag.put("id", new TagString("minecraft:pig"));
            break;
        case PigZombie:
            entityTag.put("id", new TagString("minecraft:zombie_pigman"));
            break;
        case PolarBear:
            entityTag.put("id", new TagString("minecraft:polar_bear"));
            break;
        case Rabbit:
            entityTag.put("id", new TagString("minecraft:rabbit"));
            break;
        case Sheep:
            entityTag.put("id", new TagString("minecraft:sheep"));
            break;
        case Silverfish:
            entityTag.put("id", new TagString("minecraft:silverfish"));
            break;
        case Skeleton:
            entityTag.put("id", new TagString("minecraft:skeleton"));
            break;
        case Stray:
            entityTag.put("id", new TagString("minecraft:stray"));
            break;
        case WitherSkeleton:
            entityTag.put("id", new TagString("minecraft:wither_skeleton"));
            break;
        case Slime:
            entityTag.put("id", new TagString("minecraft:slime"));
            break;
        case Snowman:
            entityTag.put("id", new TagString("minecraft:snowman"));
            break;
        case Spider:
            entityTag.put("id", new TagString("minecraft:spider"));
            break;
        case Squid:
            entityTag.put("id", new TagString("minecraft:squid"));
            break;
        case Witch:
            entityTag.put("id", new TagString("minecraft:witch"));
            break;
        case Wither:
            entityTag.put("id", new TagString("minecraft:endermite"));
            icon.setGlowing(true);
            break;
        case Wolf:
            entityTag.put("id", new TagString("minecraft:wolf"));
            break;
        case Vex:
            entityTag.put("id", new TagString("minecraft:vex"));
            break;
        case Villager:
            entityTag.put("id", new TagString("minecraft:villager"));
            break;
        case Vindicator:
            entityTag.put("id", new TagString("minecraft:vindication_illager"));
            break;
        case Zombie:
            entityTag.put("id", new TagString("minecraft:zombie"));
            break;
        case ZombieVillager:
            entityTag.put("id", new TagString("minecraft:zombie_villager"));
            break;
        case Husk:
            entityTag.put("id", new TagString("minecraft:husk"));
            break;
    }
    icon.addTag("EntityTag", entityTag);
}
Also used : TagString(de.keyle.knbt.TagString) TagCompound(de.keyle.knbt.TagCompound)

Example 2 with TagString

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

the class EggIconService method updateIcon.

@Override
public void updateIcon(MyPetType type, IconMenuItem icon) {
    icon.setMaterial(Material.MONSTER_EGG);
    TagCompound entityTag = new TagCompound();
    switch(type) {
        case Bat:
            entityTag.put("id", new TagString("Bat"));
            break;
        case Blaze:
            entityTag.put("id", new TagString("Blaze"));
            break;
        case CaveSpider:
            entityTag.put("id", new TagString("CaveSpider"));
            break;
        case Chicken:
            entityTag.put("id", new TagString("Chicken"));
            break;
        case Cow:
            entityTag.put("id", new TagString("Cow"));
            break;
        case Creeper:
            entityTag.put("id", new TagString("Creeper"));
            break;
        case EnderDragon:
            entityTag.put("id", new TagString("EnderDragon"));
            break;
        case Enderman:
            entityTag.put("id", new TagString("Enderman"));
            break;
        case Endermite:
            entityTag.put("id", new TagString("Endermite"));
            break;
        case Ghast:
            entityTag.put("id", new TagString("Ghast"));
            break;
        case Giant:
            entityTag.put("id", new TagString("Giant"));
            break;
        case Guardian:
            entityTag.put("id", new TagString("Guardian"));
            break;
        case Horse:
            entityTag.put("id", new TagString("EntityHorse"));
            break;
        case IronGolem:
            entityTag.put("id", new TagString("VillagerGolem"));
            icon.setGlowing(true);
            break;
        case MagmaCube:
            entityTag.put("id", new TagString("LavaSlime"));
            break;
        case Mooshroom:
            entityTag.put("id", new TagString("MushroomCow"));
            break;
        case Ocelot:
            entityTag.put("id", new TagString("Ozelot"));
            break;
        case Pig:
            entityTag.put("id", new TagString("pig"));
            break;
        case PigZombie:
            entityTag.put("id", new TagString("PigZombie"));
            break;
        case PolarBear:
            entityTag.put("id", new TagString("PolarBear"));
            break;
        case Rabbit:
            entityTag.put("id", new TagString("Rabbit"));
            break;
        case Sheep:
            entityTag.put("id", new TagString("Sheep"));
            break;
        case Silverfish:
            entityTag.put("id", new TagString("Silverfish"));
            break;
        case Skeleton:
            entityTag.put("id", new TagString("Skeleton"));
            break;
        case Slime:
            entityTag.put("id", new TagString("Slime"));
            break;
        case Snowman:
            entityTag.put("id", new TagString("Snowman"));
            break;
        case Spider:
            entityTag.put("id", new TagString("Spider"));
            break;
        case Squid:
            entityTag.put("id", new TagString("Squid"));
            break;
        case Witch:
            entityTag.put("id", new TagString("Witch"));
            break;
        case Wither:
            entityTag.put("id", new TagString("WitherBoss"));
            icon.setGlowing(true);
            break;
        case Wolf:
            entityTag.put("id", new TagString("Wolf"));
            break;
        case Villager:
            entityTag.put("id", new TagString("Villager"));
            break;
        case Zombie:
            entityTag.put("id", new TagString("Zombie"));
            break;
    }
    icon.addTag("EntityTag", entityTag);
}
Also used : TagString(de.keyle.knbt.TagString) TagCompound(de.keyle.knbt.TagCompound)

Example 3 with TagString

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

the class EggIconService method updateIcon.

@Override
public void updateIcon(MyPetType type, IconMenuItem icon) {
    icon.setMaterial(Material.MONSTER_EGG);
    TagCompound entityTag = new TagCompound();
    switch(type) {
        case Bat:
            entityTag.put("id", new TagString("Bat"));
            break;
        case Blaze:
            entityTag.put("id", new TagString("Blaze"));
            break;
        case CaveSpider:
            entityTag.put("id", new TagString("CaveSpider"));
            break;
        case Chicken:
            entityTag.put("id", new TagString("Chicken"));
            break;
        case Cow:
            entityTag.put("id", new TagString("Cow"));
            break;
        case Creeper:
            entityTag.put("id", new TagString("Creeper"));
            break;
        case EnderDragon:
            entityTag.put("id", new TagString("EnderDragon"));
            break;
        case Enderman:
            entityTag.put("id", new TagString("Enderman"));
            break;
        case Endermite:
            entityTag.put("id", new TagString("Endermite"));
            break;
        case Ghast:
            entityTag.put("id", new TagString("Ghast"));
            break;
        case Giant:
            entityTag.put("id", new TagString("Giant"));
            break;
        case Guardian:
            entityTag.put("id", new TagString("Guardian"));
            break;
        case Horse:
            entityTag.put("id", new TagString("EntityHorse"));
            break;
        case IronGolem:
            entityTag.put("id", new TagString("VillagerGolem"));
            icon.setGlowing(true);
            break;
        case MagmaCube:
            entityTag.put("id", new TagString("LavaSlime"));
            break;
        case Mooshroom:
            entityTag.put("id", new TagString("MushroomCow"));
            break;
        case Ocelot:
            entityTag.put("id", new TagString("Ozelot"));
            break;
        case Pig:
            entityTag.put("id", new TagString("pig"));
            break;
        case PigZombie:
            entityTag.put("id", new TagString("PigZombie"));
            break;
        case PolarBear:
            entityTag.put("id", new TagString("PolarBear"));
            break;
        case Rabbit:
            entityTag.put("id", new TagString("Rabbit"));
            break;
        case Sheep:
            entityTag.put("id", new TagString("Sheep"));
            break;
        case Silverfish:
            entityTag.put("id", new TagString("Silverfish"));
            break;
        case Skeleton:
            entityTag.put("id", new TagString("Skeleton"));
            break;
        case Slime:
            entityTag.put("id", new TagString("Slime"));
            break;
        case Snowman:
            entityTag.put("id", new TagString("Snowman"));
            break;
        case Spider:
            entityTag.put("id", new TagString("Spider"));
            break;
        case Squid:
            entityTag.put("id", new TagString("Squid"));
            break;
        case Witch:
            entityTag.put("id", new TagString("Witch"));
            break;
        case Wither:
            entityTag.put("id", new TagString("WitherBoss"));
            icon.setGlowing(true);
            break;
        case Wolf:
            entityTag.put("id", new TagString("Wolf"));
            break;
        case Villager:
            entityTag.put("id", new TagString("Villager"));
            break;
        case Zombie:
            entityTag.put("id", new TagString("Zombie"));
            break;
    }
    icon.addTag("EntityTag", entityTag);
}
Also used : TagString(de.keyle.knbt.TagString) TagCompound(de.keyle.knbt.TagCompound)

Example 4 with TagString

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

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

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