Example: Potato Cannon

  • the plugins does not work for me


    Error occurred during application-update (25)
    java.lang.NullPointerException
    at H.m.l(SourceFile:1458)
    at H.m.a(SourceFile:935)
    at H.m.a(SourceFile:789)
    at H.n.onSelectionChangeEvent(SourceFile:227)
    at de.jiw.gui.elements.ElementSet.onMouseButtonEvent(ElementSet.java:913)
    at de.jiw.gui.core.Screen.onMouseButtonEvent(Screen.java:1729)
    at com.jme3.input.InputManager.processQueue(InputManager.java:833)
    at com.jme3.input.InputManager.update(InputManager.java:909)
    at commons.JIWApplication.update(SourceFile:313)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
    at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:198)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
    at java.lang.Thread.run(Unknown Source)

  • Nitrado probably messed this up, or maybe the way I uploaded it onto Nitrado. The way it wants me to upload is wonky that I gain a "?" icon. I can fire it, but it won't show the model. It won't read the model. Invisible gun.


    I was also hoping you could manually load the gun to fire the potatoes.


    I had it working fine in SP. So yes, maybe some server-problem?

  • I had it working fine in SP. So yes, maybe some server-problem?

    So, it's singleplayer only? I guess it doesn't want to read while on a server. ?( Shark noted it works fine for him on his server? He noted it worked fine on his server so I'm wonder how I'm screwing things up this time. It's something simple again.


    I could try confirming this in singleplayer then for both this and the backpack because it seems to hate it on servers.

  • So, it's singleplayer only? I guess it doesn't want to read while on a server. ?( Shark noted it works fine for him on his server? He noted it worked fine on his server so I'm wonder how I'm screwing things up this time. It's something simple again.
    I could try confirming this in singleplayer then for both this and the backpack because it seems to hate it on servers.

    Yes maybe test it in singleplayer first - Goodluck :thumbsup:

  • How to add the game ? I dont know

    1) Download the Potato.zip file above.
    2) Open your Rising World Directory in steam and then the folder called plugins if you do not have on simply create one.
    3) Unzip the potato.zip file into the plugins folder, exit, start rising world & enjoy!


    Hope this helps you out my friend :thumbup:

  • 1) Yukarıdaki Potato.zip dosyasını indirin.2) Rising World Directory'nizi buhara açın ve sonra eklentiler olarak adlandırılan klasörü basit bir tane oluşturmadıysanız açın.
    3) potato.zip dosyasını eklentiler klasörüne çıkarın, çıkın, yükselen dünyaya başlayın ve tadını çıkarın!


    Umarım bu size arkadaşımdan yardım eder: thumbup:

    Thankss

  • The way it wants me to upload is wonky that I gain a "?" icon

    This indicates that the model could not be loaded (downloaded)... maybe the server interrupts the download for some reason? Or maybe the model/texture files gets deleted automatically? Make sure there is an "assets" subfolder in your plugin folder containing a "potatocannon.dds", "potatocannon_icon.png" and a "potatocannon.obj" file :)


    Apparently the model which belongs to the StaticModelLoader was loaded properly in your case. For this plugin, the model file is packed into the jar file. The PotatoCannon plugin, on the other hand, uses separate asset files (in the asset subfolder), so it's likely that the server cannot access these files for some reason?


    So, it's singleplayer only?

    In general every plugin works in both single- and multiplayer^^

  • Hallo @red51 wenn ich Z.b. 10 Kartoffeln im Inventar habe bleiben sie auch drin ,also mann kann 100 Kartoffeln abfeuern und hat trotztem noch 10 im Inventar ;) .
    Ich glaube das es nicht so sein soll oder??

    Lost City 2.0 *=[TKC]=*
    Rising World :Java Server: 185.150.25.186:4300

    Rising World :Unity Server : 85.14.192.152:4255

    Rust Server Lost Island: 185.150.25.186:26000

    Day of Defead Source: Lost Solider IP:185.150.25.186:27200

    Teamspeak: 185.150.25.186:9987

    http://steamcommunity.com/groups/RIWOLOCI



  • Noticed you could get infinite food from this hmm... intentional?

    Yes, actually the plugin is only meant to be a small example, and in order to keep it as simple as possible, there are no checks if the player has enough potatoes in his inventory ;)


    Hallo @red51 wenn ich Z.b. 10 Kartoffeln im Inventar habe bleiben sie auch drin ,also mann kann 100 Kartoffeln abfeuern und hat trotztem noch 10 im Inventar

    Im Grunde genommen soll das Plugin nur als kleines Beispiel dienen, und um den Code möglichst einfach und verständlich zu halten, gibt es keine Prüfung, ob der Spieler tatsächlich Kartoffeln im Inventar hat ;)

  • I anyone tries this and get frustrated about the potato mess all over the place, I have created a potato cleaner can be added by adding these lines to the original right after the impulse:

            PotatoCleaner potatoCleaner = new PotatoCleaner(projectile);
            Timer killProjectile = new Timer(1, 2, 0, potatoCleaner);
            killProjectile.start();


    And create a PotatoCleaner.java in the same folder as original source file with :


    package net.risingworld.api.example.customitem.gun;

    import net.risingworld.api.objects.WorldItem;

    public class PotatoCleaner implements Runnable{
        private WorldItem potato;
        public PotatoCleaner(WorldItem pota)
    {
    potato = pota;
    }
        public void run()
    {
            potato.destroy();
    }
    }


    Basically it creates a timer that destroy the potato after a 2 count.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!