Lib's Disguises - Creating a disguise

Sep 7, 2016
Lib's Disguises - Creating a disguise

  • Disguise Types(top)


    To create a disguise, you need to fetch the type of disguise you want to use.
    Code (Java):
    DisguiseType.OCELOT
    This is the disguise type of ocelot.

    ARMOR_STAND,
    ARROW
    BAT,
    BLAZE,
    fffff
    BOAT,
    CAVE_SPIDER,
    CHICKEN,
    COW,
    CREEPER,
    DONKEY,
    DROPPED_ITEM,
    EGG,
    ELDER_GUARDIAN,
    ENDER_CRYSTAL,
    ENDER_DRAGON,
    ENDER_PEARL,
    ENDER_SIGNAL,
    ENDERMAN,
    ENDERMITE,
    EXPERIENCE_ORB,
    FALLING_BLOCK,
    FIREBALL,
    FIREWORK,
    FISHING_HOOK,
    GHAST,
    GIANT,
    GUARDIAN,
    HORSE,
    IRON_GOLEM,
    ITEM_FRAME,
    LEASH_HITCH,
    MAGMA_CUBE,
    MINECART,
    MINECART_CHEST,
    MINECART_COMMAND,
    MINECART_FURNACE,
    MINECART_HOPPER,
    MINECART_MOB_SPAWNER,
    MINECART_TNT,
    MULE,
    MUSHROOM_COW,
    OCELOT,
    PAINTING,
    PIG,
    PIG_ZOMBIE,
    PLAYER,
    PRIMED_TNT,
    RABBIT,
    SHEEP,
    SILVERFISH,
    SKELETON,
    SKELETON_HORSE,
    SLIME,
    SMALL_FIREBALL,
    SNOWBALL,
    SNOWMAN,
    SPIDER,
    SPLASH_POTION,
    SQUID,
    THROWN_EXP_BOTTLE,
    UNDEAD_HORSE,
    VILLAGER,
    WITCH,
    WITHER,
    WITHER_SKELETON,
    WITHER_SKULL,
    WOLF,
    ZOMBIE,
    ZOMBIE_VILLAGER,
    UNKNOWN;

    You then need to construct a disguise.

    The names all follow the EntityType names.
    You can fetch the disguisetype from a entitytype using
    Code (Java):
    DisguiseType.getType(EntityType.OCELOT);

    PlayerDisguise(top)


    This is a simple disguise. You are constructing a disguise for a player.
    So anyone who uses this disguise, will be turned into a player from everyone's perceptive.

    This PlayerDisguise is only used for disguising something as a player

    There are two constructors.

    Code (Java):
    PlayerDisguise playerDisguise = new PlayerDisguise("libraryaddict");
    This is the simplest to use. You are making a disguise of a player, where their name will be libraryaddict!

    Code (Java):
    PlayerDisguise playerDisguise = new PlayerDisguise("libraryaddict", true);
    This is another constructor. The 'true' means that if the disguised entity makes a sound, the sound will be turned into the disguised eqivelent.
    This does not override the config settings, and is 'true' in the previous constructor.

    MobDisguise(top)


    This is a mob disguise.
    Is it living? If yes. Then it uses this disguise.

    Disguises such as bat, ocelot, enderdragon all use this.

    There are three constructors.

    Code (Java):
    MobDisguise mobDisguise = new MobDisguise(DisguiseType.OCELOT);
    This one creates a mob disguise so that you will look like a adult ocelot. Pretty simple.

    Code (Java):
    MobDisguise mobDisguise = new MobDisguise(DisguiseType.OCELOT, false);
    This here will create a mob disguises where you look like a baby ocelot. The boolean defines if its an adult or not.
    true = adult
    false = baby

    Code (Java):
    MobDisguise mobDisguise = new MobDisguise(DisguiseType.OCELOT, false, true);
    This creates a mob disguise where the disguised will look like a baby ocelot. As well as has its sound replaced to that of an ocelots.

    MiscDisguise(top)


    This is for all the other disguises.
    Falling blocks, dropped items and boats. etc.
    They all belong here.

    This time, there is a lot more disguise constructors you can use.

    As there are different constructors which do mostly the same thing, I will not be listing them all.

    And as mentioned earlier on. You can do 'true/false' to replace the sounds or not. By default it is true.

    Code (Java):
    MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.PAINTING);
    This creates a disguise for a painting. So you will look like a painting

    Code (Java):
    MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.PAINTING, 0);
    This creates a disguise where additional data is supplied in the form of a number.
    This is only used by select disguises. This is not required.
    If you attempt to use this on a disguise where its not applied. It will be reset to the default.

    Fishing hook: The entity id of the entity the fishing hook is coming from.
    Arrow: The entity id of the shooter
    Small fireball & Fireball: The entity id of the shooter
    Wither skull: The entity id of the shooter
    Splash potion: The potion id for a colored potion
    Painting: The painting id to select
    Falling Block: The block ID
    Dropped Item: The item ID

    Code (Java):
    MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.FALLING_BLOCK, 18, 1);
    This constructor is only used for falling blocks and dropped items. The second integer parameter indicating the item/block data.
    Using this constructor for any other disguise type will have no additional effect, than if you had left out the second integer parameter.

    The first number is the block ID
    The second number is the block durability/item data.
    So I'm currently spawning in a leaves block which is spruce.

  • Loading...
  • Loading...