Posts by yahwho

    You should use;

    Java
    String playerUID = player.getUID();


    The UID is a String there is no reason to convert it to a long, unless you are planning on doing mathematical functions on it?


    You are probabaly seeing longs in the Javadoc as Red used to store the UID as a long in the old version.


    Longs aren't needed, the UID, albeit looking like a number, is an ID an not a number.


    If you really wanted to use longs though you can cast a String to a long.

    Java
    long playerUID = Long.parseLong(player.getUID());

    However, I do not recommend casting the UID. ^^

    Oh you got there before I could delete it :D


    Yes, I just tried again and it didn't.


    It had been on... I wonder if there is a cool down period for the furnaces?


    (it was off, and it had cooled down enough for ingots to be removed)

    Hi Red,


    When a player is dead, and seeing the respawn screen. The Players State as retrieved from player.getState() comes back as State.Default and not as State.Dead

    Another mini server update to version 0.2.1.2


    You can now buy domesticated NPCs via the Z/Y Menu (QWERTY / QWERTZ dependant).


    Horses are also now protected from other players taking them. Place a saddle on a horse to claim it as yours. Horses and other domesticated NPCS are safe on your own AXES land deeds.


    You can also feed your livestock and move them around. They will chase you for more food. Each animal has a group of foods they will eat.


    🐷 Pigs are gready and will eat carrots, sugarbeet, pumpkinslices, watermelonslices, potatos, lettuceleavess, tomatos, and corncobs.

    🐮 Cows will eat carrots or sugarbeets.

    🐐 Goats will eat carrots, sugarbeet, potatos, lettuceleaves, tomatoes, corncobs, watermelonseeds, and pumpkinseeds.

    🐑 Sheep will eat carrots, sugarbeet, lettuceleaves, tomatoes, and corncobs.

    🐔Chickens will eat corncobs, watermelonseeds, and pumpkinseeds.

    🦌 Deers will eat carrots, sugarbeets, lettuceleaves, tomatoes, and corncobs.


    This is the first part of reintroducting the MR animal husbandry.


    Here's a short, silly, video.


    Wild animals seem to be immortals.

    Hi Ozo,


    I can say that from a database point of view, the animal NPCs do all have attribtutes for sleep, age, hunger, thirst etc.


    So I suspect Red's aim is for animal to no longer be immortal at some point 8)


    I also suspect this will come into play when animal husbandry comes in.

    This is brilliant! Thanks!


    It's mainly for being able to read the console output easier.


    For example, I have some producer-consumer code, and having one one, colour and the other another is really useful from a sanity point of view.

    I'm writing some code to do with animals, so mainly the animal alert sounds was what I was after.


    In the old API I used code like this:

    Java
    player.playGameSound("player_eat_tomato");
    player.playGameSound("pig_idle");


    The reason I preferred using this as opposed to plugin added sound was for bandwidth reasons - the players already have these sounds locally.

    Hi, I see there is a :


    Java
    player.playSound(SoundAsset);


    But is there a way to play sounds that area already in the game (like in the Java version) ?


    Java
    player.playGameSound("sound_effect");

    Medieval Realms 0.2.1 and 0.2.1.1 have been released


    Updates to the Deed Management System (0.2.1)



    Medieval Realms Bank is now live - deposit Gold Ingots for crowns. ( 0.2.1.1)


    You could do this through iteration


    Something like


    Java
    Inventory inventory = player.getInventory();
    Item[] items = inventory.getAllItems();
    Iterator<Item> iterator = Arrays.stream(items).iterator();
    while(iterator.hasNext()) {
    Item i = (Item)iterator.next();
    //Do you compare work here with i
    }