[INACTIVE][FUN/MECH] Philosopher's Box v1.7 - Item conversion based on defined values. [740]

Discussion in 'Inactive/Unsupported Plugins' started by Nohup, Feb 27, 2011.

  1. Offline

    primaryartemis

    Hey I positively love this plugin's concept but I need some help. On my server I can build the thing, but I can not cycle through the materials on the sign at all and when I click the button it says that I need to select a conversion. I have items set to true in the config but I just can't scroll through them for some odd reason.


    ---------------FIXED-------

    Found out it was because I was not capitalizing the P and B on my sign, GREAT PLUGIN!
     
  2. Offline

    Nohup

    Thanks :)
     
  3. Offline

    Grimmkrieg

    I was looking for a way to "melt" old, broken-down pieces of iron armor into a couple of ingots for recycling, and this is perfect! Fits the RP standards I try to keep up and has a ton of potential for other applications. Cheers!

    Edit: I'm thinking it may not be possible to do what I was envisioning, now that I actually look into it and try to config it. If I were to set something like this:
    Code:
    opsonly: false
    material:
        265:
            convertto: true
            value: 1
        306:
            convertto: false
            value: 2
        307:
            convertto: false
            value: 3
        308:
            convertto: false
            value: 2
        309:
            convertto: false
            value: 1
    I assume that it won't let me "downconvert" to a lower-value item?
     
  4. Offline

    Nohup

    It would let you convert in either direction to any material set to True. However, use the name constants as specified in teh wiki link, these are the internal Bukkit enumerated constants, not the values.
     
  5. Offline

    Nohup

    Updated to work with latest Bukkit version
     
  6. Offline

    darkshaed

    plugin works on 617 but I get a lot of

    [SEVERE] could not pass event PLAYER_INTERACT to Philosopher's Box java.lang.NullpointerException at com.nohupgaming.minecraft.listener.player.PhilosophersBoxPlayerListener.onPlayerInteract<PhilosophersBoxPlayerListener.java:78>
    and it goes on and on.
     
  7. Offline

    Nohup

    @darkshaed - New version out there to get rid of that error.
     
  8. Offline

    darkshaed

    wow thanks
     
  9. Offline

    xClearScreenx

    Ok, so I'm trying to set up multiple conversions but only allow for those conversions to happen.
    i.e.
    Code:
    opsonly: false
    material:
        glowstone_dust:
            convertto: true
            value: 2
        gold_ingot:
            convertto: false
            value: 1
    material:
        string:
            convertto: true
            value: 1
        wool:
            convertto: false
            value: 9
    (i may have my wool/string ratio backwards, but nonetheless)
    In order to have gold turn into glowstone dust and seperately have wool convert back to string.

    Is this possible?

    Thanks
     
  10. Offline

    Apoc_8bit

    Great plugin! We use this on our server to replace the need to visit the Nether (it was too buggy for most people's experiences). In addition we can put undesirable materials to use again. Here's our conversion:
    2 redstone -> 1 glowstone dust
    10 gravel -> 1 netherrack
    1 slime ball -> 1 soul sand

    One small frustration I ran into during config was getting the material names right. I followed the minecraftwiki naming convention, but that happened to be wrong on "slimeball" which was "slime_ball". I think allowing item codes would help prevent config mistakes.
     
  11. Offline

    Killerrabbit

    Hello and thank you for a very great plugin, I took this to my hearth on the server instantly due to the very easy reason: I do not want any stupid virtual currency's that exist in a variable, I want ingame items as currency (mainly gold_ingot & diamond as currency on my server). So this plugin now works as the servers first "provisioners shop"

    I know have a couple suggestions/questions (request? :) ) for this plugin and it would get 5 star+ approval and recommendation from me:

    * First of all, is it possible to make a "sellback" ratio for this plugin? For example user puts Gold ingot there and gets ex 50 logs. Then currently in theory if you allow it, he can just go harvest 50 logs and put them in the box and convert them to 1 gold ingot. My thought that if you try to convert something after your first push of button / insert anything that the box did not convert to a lesser ratio than the gold->log conversion rate. So you would need to put 100 logs there to get 1 gold back instead of 50? (currently I have disabled conversion back to gold_ingots due to the 1:1 ratio of everything)

    * Second suggestion, would it be possible to have separate box'es with seperate options on what they sell? Maybe a way to identify which conversion box does what on the sign, "Philosophers box1"-sign -> config1," Philosophers box2"- sign -> config2. This you could have different uses for differente stores, lets say a fletchers shop only have the option on the sign to sell feathers, arrows, sticks - while the next config in the provisioner uses more mundane setup like cows milk etc :)
    -Atleast this is how I use it now, a store on the server and it works very great, but more functionality so people has to visit different stores to get different items would be +++ (I also have a NPC mode that happily stands close to the box inside the shop and explains the functionality of the box to my server users!)

    * Bug report? I tried to make my users be able to buy a "rare" burning furnace for 4 gold (128x4 value), but it only converts to normal furnace apparently

    Once again, thank you for a veeery nice plugin with unlimited uses for a server admin! :)

    edit: maybe 2 different boxes for buy & sell, one who only accepts items that has the value convertto: false (diamonds,gold in my case), so once it is converted you cannot convert it to next item. And one box who works the opposite way with a different ratio then, so you can put the "2 x logs" there to get the gold,diamond or whatever item you have assigned as "currency" by convertto: false, or other sort of restrictor ID in config file.

    Damn I would love to try to make plugins myself, if I only knew how to program! :)
     
  12. Offline

    Elliot777

    Im getting this error im running on CB670 Is there any way i can fix this

    Code:
    [SEVERE] Could not load 'plugins\PhilosophersBox.jar' in folder 'plugins': name 'Philosopher's Box' contains invalid characters.
    org.bukkit.plugin.InvalidDescriptionException: name 'Philosopher's Box' contains invalid characters.
        at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:137)
        at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:30)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:61)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:84)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
     
  13. I saw it asked above, but i'll ask again :)

    Is is possible (or going to be possible), to have different conversion types defined for boxes? I would like to have one box that converts gravel-> flint, and another box that will convert materials to armor.. but i dont want people to be able to make armor out of flint or gravel... Until thats possible, i dont think this would be of much use on our servers :(

    Thanks :)
     
  14. Offline

    Devlah

    This seems to be consistent using CB670. Although as noted in the header, right now (as of this writing) Philosopher's Box is tested against CB617, so errors such as these are to be expected, at least until the next plugin update.
    With the rate at which CraftBukkit is updated, it would be ridiculous to expect all the plugin developers to keep up in any short amount of time. Who knows what they broke across versions?

    Nohup! Great plugin, looking forward to the next update!
     
  15. Offline

    MacVaultDweller

    Hi Nohup
    Hope you update for 733.
     
  16. Offline

    Nohup

    Hopefully will be done tonight.

    v 1.7 out

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  17. Offline

    Wardogz

    Download is still for 1.6

    thanks for all the work on this, keep up the good work!
     
  18. Offline

    Nohup

    hmm, uploaded another new one, should be 1.7
     
  19. Offline

    Tynakuh

    Still doesn't work for me I get this error when i attempt to convert my gravel to flint:

    Show Spoiler
    Code:
    23:15:03 [SEVERE] Exception in thread "Thread-13"
    23:15:03 [SEVERE] java.lang.NullPointerException
    23:15:03 [SEVERE]       at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:22)
    23:15:03 [SEVERE]       at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:10)
    23:15:03 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:03 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:03 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:03 [SEVERE]       at java.util.Arrays.sort(Unknown Source)
    23:15:03 [SEVERE]       at com.nohupgaming.minecraft.ContentConverter.run(ContentConverter.java:33)
    23:15:03 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    23:15:27 [INFO] CraftPlayer: Giving Tynakuh some 13
    23:15:31 [SEVERE] Exception in thread "Thread-14"
    23:15:31 [SEVERE] java.lang.NullPointerException
    23:15:31 [SEVERE]       at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:23)
    23:15:31 [SEVERE]       at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:10)
    23:15:31 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:31 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:31 [SEVERE]       at java.util.Arrays.mergeSort(Unknown Source)
    23:15:31 [SEVERE]       at java.util.Arrays.sort(Unknown Source)
    23:15:31 [SEVERE]       at com.nohupgaming.minecraft.ContentConverter.run(ContentConverter.java:33)
    23:15:31 [SEVERE]       at java.lang.Thread.run(Unknown Source)


    My config file:

    Code:
    opsonly: false
    
    material:
        flint:
            convertto: true
            value: 1
        gravel:
            convertto: false
            value: 1
     
  20. Offline

    Wardogz

    Version is still reading as 1.6 in the config.yml file (though i havent loaded it on the server yet, will load it here in a few and let you know

    Code:
    12:20:52 [SEVERE] Exception in thread "Thread-11"
    12:20:52 [SEVERE] java.lang.NullPointerException
    12:20:52 [SEVERE]     at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:23)
    12:20:52 [SEVERE]     at com.nohupgaming.minecraft.util.ValuedItemStackComparator.compare(ValuedItemStackComparator.java:10)
    12:20:52 [SEVERE]     at java.util.Arrays.mergeSort(Arrays.java:1283)
    12:20:52 [SEVERE]     at java.util.Arrays.mergeSort(Arrays.java:1294)
    12:20:52 [SEVERE]     at java.util.Arrays.mergeSort(Arrays.java:1294)
    12:20:52 [SEVERE]     at java.util.Arrays.sort(Arrays.java:1223)
    12:20:52 [SEVERE]     at com.nohupgaming.minecraft.ContentConverter.run(ContentConverter.java:33)
    12:20:52 [SEVERE]     at java.lang.Thread.run(Thread.java:636)

    this is what i get when i try to convert stone to gold.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  21. Offline

    Nohup

    I updated one more to take care of the NPE, but as far as the plugin.yml when I open the jar it says 1.7. May want to clear out old versions and/or your browser cache. Oh, and make sure you are downloading from the main link, not the test one from before when i made a patch fix...
     
  22. Offline

    Wardogz

    k, cleared it from the system will update on server here in a few, just got DropBonus working

    Code:
    16:39:09 [SEVERE] Exception in thread "Thread-23"
    16:39:09 [SEVERE] java.lang.NullPointerException
    16:39:09 [SEVERE]     at com.nohupgaming.minecraft.ContentConverter.run(ContentConverter.java:39)
    16:39:09 [SEVERE]     at java.lang.Thread.run(Thread.java:636)
    
    This is the errors i am getting now, its reading 1.7 now, and it only gives the errors when trying to convert.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  23. Offline

    Nohup

    bah, that one is fixed now too. searched for any other place where i was using similar code and didnt find one so hopefully that takes care of it. Sorry, trying to multi-task quick fixes with this and work all at the same time, and get it done before I have to travel for the next few weeks...
     
  24. Offline

    felixme86

    got a new error now
    19:29:54 [SEVERE] Exception in thread "Thread-10"
    19:29:54 [SEVERE] java.lang.NullPointerException
    19:29:54 [SEVERE] at com.nohupgaming.minecraft.util.PhilosophersUtil.calcu
    lateValue(PhilosophersUtil.java:41)
    19:29:54 [SEVERE] at com.nohupgaming.minecraft.ContentConverter.run(Conten
    tConverter.java:47)
    19:29:54 [SEVERE] at java.lang.Thread.run(Unknown Source)
    >
     
  25. Offline

    Nohup

    @#$%$#@#$

    okay, whatever time this is, it should be the charm!
     
  26. Offline

    felixme86

    hooray fixed! thanks so much!
     
  27. Offline

    Singso

    Getting this error after some sucsessful conversions:

    Code:
    2011-05-01 20:08:29 [SEVERE] java.lang.IllegalStateException: TickNextTick list out of synch
    2011-05-01 20:08:29 [SEVERE]     at net.minecraft.server.World.a(World.java:1693)
    2011-05-01 20:08:29 [SEVERE]     at net.minecraft.server.World.doTick(World.java:1465)
    2011-05-01 20:08:29 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:361)
    2011-05-01 20:08:29 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    2011-05-01 20:08:29 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-01 20:08:29 [SEVERE] Unexpected exception
    java.lang.IllegalStateException: TickNextTick list out of synch
        at net.minecraft.server.World.a(World.java:1693)
        at net.minecraft.server.World.doTick(World.java:1465)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:361)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Hope you can give me a Hint what i do wrong or how to fix it :)
     
  28. Offline

    Nohup

    Hmm, that doesn't sound good, and unfortunately I don't think it is anything you did. When you do a conversion it launches a thread that does the conversion itself via Minecraft's scheduler. Did you try and do a lot of things alot of different times really fast or anything? Or were multiple people trying to use the same box at once? I wouldn't think so but gotta ask... Basically there is a thread collision going on but I can't think of a realistic way to make the box do it unless something is wrong within the MC scheduler.
     
  29. Offline

    Singso

    I will try to reproduce the bug.
    Maybe its because i made a really big configlist with every block and half of them is obtainable. (No Items)
    I am cycling through the list with the mousewheel. Maybe this could be to fast and cause the failure.

    The major problem is that the server stop working completly, and i have to restart.
    Else i wouldn't mention it.
     
  30. Offline

    MonsieurApple

    Considered inactive.
     

Share This Page