Posts by james1bow

The next update will be available on Tuesday, April 29, in the early evening (UTC+2)

    im looking to add the player model to a load out screen so players can change their looks. is there a way to use the player preview model (the one on the inventory GUI) via API?


    Also, i cant seem to get any of the stuff for skin's to work.


    public void setSkinTest(Player player){

    Skin skin = this.player.getSkin();

    skin.setSkinColor(0xff0000);

    }

    Edit: they work but the player has to re connect to the server. only way o could get them to work was to add it to the onplayerconnect method. am i correct in thinking the player model cannot be changed once its loaded into the server?

    interested in this as well, havnt found anything. this would be nice! for example, create a custom item...if custom item is equipment and player item is sword1 take so much health from the defender and give a percentage of that to the attacker

    for the weapons picked up with no ammo issue. not sure if it would work. use the

    PlayerDropItemEvent to get the item to assign the ammo count as an attribute. when its picked up use the object definition to get the correct ammo and the attribute to add to correct amount to the players inventory.

    Can in-game models for items like pickaxes be accessed in a similar way, so we can use existing item models for custom items without needing to have new model files on the client end? Something like; ModelInformation modelInfo = new ModelInformation( {some path to in-game item model} ).

    I tried something analogous to your GameImageInformation example; i.e. new ModelInformation("Models/Items/Pickaxe/pickaxe_modern.j3o") but that didn't work server side.

    i had tried something like this and couldnt get it to work. the only supported model information is .blend and .obj. maybe try importing the model.j3o into the jmonkey sdk and convert in to an obj? not sure if that would help as ive not looked into the jmonkey sdk. my work around was to create a gui to craft a new item and assign in an attribute, then using the playerchangeequiped item eventmethod to check for the attribute and make the changes.

    red51 thank you for taking the time to give me a better explanation! And some help from yahgiggle i managed to get it working. for some reason tho, anytime i tried to code it using a lambda i would get an NPE on anything that had to do with the database(probably my lack of knowledge).


    im sure there is a cleaner way to do it but....





    I'm trying to create an economy/buy/sell system.

    this is my GUI so far


    as i am learning java the some documentation makes no sense to me. i understand i need to use callbacks for setting prices(player enters price clicks submit). i cant seem to wrap my head around how to set up call backs.

    would anyone feel friendly enough to give me a basic example? ive been watching videos but none of it makes sense to me. so sorry to ask so many questions!

    Yes, that's possible with the GameImageInformation object (which is derived from ImageInformation). It can be used to reference game textures or icons. Using it is a bit tricky though, because you need to provide the "path" to the game image. By default it tries to look for a "texture" in the "textures.jar" (which is located in "Rising World/data/assets/"), but if you add "Interface/" at the beginning of the path, it looks for the image in the "interface.jar".


    For example, to use the pickaxe icon (which is located in the "interface.jar" under "Interface/Icons/Items/", the file name is "pickaxe_0.png"), the code could look like this:

    Java
    ImageInformation icon = new GameImageInformation("Interface/Icons/Items", "pickaxe_0.png");

    thanks for the info, i had noticed the gameimageinformation method, glad to know it works in the icons. one thing i noticed while peaking around the .jars is there is no icons for block's. im guessing these icons are created during runtime using model/ texture? i think i can get around this by layering 2 images. one in the foreground with a blank outline of the blocks and lay said texture underneath. thanks again for all the info the last few month's. its been a big part of this learning experience!

    I'm currently working on a plugin for java that I will bring to unity at some point. there will be a cash register That you can place that sets a shop area. Any chests in this area can be filled with what they Want to sell. Owner can click the register to set prices and collect money from sales. Currency will be 3 coins (gold, silver, copper). The currency will be an item in your inventory So there can be player to player sales as well.

    james1bow. Please make sure no code is overlapping between this plugin, and my plugin: [Plugin] - Gestures.

    Thanks!

    Shouldnt be.

    A plugin that adds gestures.


    To use: Craft the Gestures item (workbench/WTG/gestures).

    This item only needs to be crafted once.

    Right click to open menu.

    left click to use the gesture.


    included Gestures:


    Known issue: Once a gesture is activated it stays until you change gestures or inventory item.


    Possible Plans: context menu to change gestures. this would rework right click to open a menu to select the gesture with left click

    this would add one more click to change a gesture. thoughts?

    will also be changing the preview item to an object instead of a box.

    Instructions: Extract files to your plugins folder.

    Files

    Java
    String[] entries = new String[]{"Option 1", "Option 2", "Option 3"};
    player.showContextMenu(entries, (String entry) -> {
    System.out.println("Selected entry: " + entry);
    });

    Thanks for the info! I love learning new things.

    Unfortunately it's not possible to set an animation (this only works in combination with custom items) :/ But this is planned for the new version!

    my work around is to make a custom item for all 7 gestures. gesture 2 being the one craftable (gesture1 would be to offensive a default gesture :wat:). gestures are used with primary action and clicking the secondary action changes between the other customeitem(1 for each gesture).

    will be using a context menu on right click in the future(once i know how to setup/use callbacks).

    looking for a method in the API to trigger a player animation. only thing i can find that allows anything to do with animations has to do with custom items. is there a way to do this int he API that i may be overlooking?

    Small plugin i use to test GUI functions for my plugin. can also be used when you have a plugins GUI open and the mouse pointer goes away

    just press p to show/hide the mouse pointer

    I'm learning to code. These are just a small plugin's that are part of a larger plugin i am working on. I figured someone may like to use them.


    Potions: Crafted in the workbench


    There are currently 4 potions:

    Health Potion: adds 50 points to health thirst and hunger

    Hermes Potion: add 75 percent to your sprint speed for 2 minutes

    Day Potion: turns it day

    Night Potion: turns it night


    **Day and Night potions have a 1 hour cool down to prevent spamming




    Weapons: Crafted in the anvil


    There are currently 4 swords and 4 axes (Spears to come!)

    Currently there are 4 variants of each.


    *They are a little over powered atm but would like input for this.

    **Sorry about the icons i will be fixing them.


    Install: unzip the file and copy the Potions or Weapons folder to your plugins folder


    **not sure if they works for linux/mac os?


    will be working on cooking, decor, and economy (perhaps cross server auctions) Plugins in the near future.

    Files

    • potions.zip

      (243.03 kB, downloaded 607 times, last: )
    • weapons.zip

      (1.41 MB, downloaded 754 times, last: )