Inactive [MECH] PocketCraft v1.0 - portable crafting tables [SPOUT] [1000]

Discussion in 'Inactive/Unsupported Plugins' started by skeletonofchaos, Aug 12, 2011.

  1. Offline


    PocketCraft - Portable crafting tables!
    PluginVersion 1.0
    ServerVersion /version: git-Bukkit-0.0.0-905-g9277096-b1000jnks (MC: 1.7.2)
    Download PocketCraft

    This plugin was requested by FuturaEx.


    • Spout
    • Players must be using the SpoutCraft launcher
    • Brings up a crafting table upon pressing the c key.
    • Implement permission support
    • Come up with more ideas for this plugin (need some help here)
    Released plugin.​
    Ylar, jlu, GameCharmer and 2 others like this.
  2. Offline


    I hope for a permission update soon :)
  3. Offline


    Working on it guys srry very busy
  4. Has this been updated any time recently? With Spout 644, Spoutcraft 1000, using the 1597 build of Bukkit, I keep getting the following error output whenever I press C to bring up the internal crafting table:

    [SEVERE] Could not pass event CUSTOM_EVENT to PocketCraft
    java.lang.NoSuchFieldError: inventory
            at me.skeletonofchaos.portableworkbench.PocketBench.<init>(
            at me.skeletonofchaos.portableworkbench.KeyboardListener.onKeyPressedEvent(
            at org.getspout.spoutapi.event.input.InputListener.onCustomEvent(
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at org.getspout.spout.packet.CustomPacket.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at org.getspout.spout.SpoutNetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.w(
    Do you know why this is occurring?

    Also, if you're no longer interested in working on this plugin (a possibility given the last time posted in this thread was a couple months ago), perhaps you could upload the source code somewhere so that others could pick up where you left off?

    - Edit -
    To clarify, what ends up happening is this: Everything SEEMS to work fine, you can put items into the crafting table grid, make stuff, etc, etc. Everything seems to work. Until you try to use one of those items, and then things start going obviously wrong (for instance, if you crafted a pickaxe, blocks destroyed by that pickaxe constantly reappear, etc), and eventually, typically when you open a chest or something else that uses the inventory as well, everything in your inventory resets to how it was before you did anything in the internal crafting table.

    - Edit 2 -
    Forgot to tag: @skeletonofchaos
  5. @skeletonofchaos

    Would greatly appreciate if you could come back to this plugin - I tried for most of today to see if I could hack together a fix to the issue in my last post after installing a Java class decompiler and setting up a Java IDE, but alas I'm too inept to know what I am doing, both with Java in general and with Bukkit and Spout plugin development more specifically, so I couldn't really get anywhere. I also think I might've installed a version of Java higher than the one supported by Bukkit or something like that, which may have significantly undermined my efforts. At any rate, I imagine I'm not the only one who would love to have something like this available again (unless of course it's only breaking for me, in which case, any insight into why, based on the output posted in last post?), probably even not the only one who'd be happy to have it without any further features - but I think yours is the only publicly available plugin that does this for bukkit (I think there's some modloader stuff that works with older version of minecraft's vanilla server, but idk...)

    Huh... What do you know, I went ahead and installed the 1.6 version of the JDK, compiled my newbishly fixed version with 1.6 instead of 1.7 as the Bukkit wiki page on setting up your development environment recommends, and it works. Might be that the original code as decompiled was fine, just needed building with some newer libs or something? As written it wouldn't compile on 1.7 due to an "ambiguous reference" or somesuch error, but that wasn't at the same line in the code that the server console output the error about on the version available for download in this thread.

    Now, because I did technically decompile the source of this plugin to make it work for me, technically redistributing the fixed version would be illegal if @skeletonofchaos disapproves. Now, if you don't care/mind skeletonofchaos, I'd be happy to A: give anyone who asks the 'fixed' version (with a pretty big disclaimer that there might be unforseen bugs given how I don't really know how I fixed things to begin with - seems to work fine), and B: take it from here and maybe add superperms support and some other stuff as I get my bearings with this spout/bukkit plugin coding thing. Naturally credit would be given to skeletonofchaos for the initial work. Alternatively, if skeletonofchaos wants to still maintain this package, I will be happy to contribute to further development if skeletonofchaos wants that whenever I can.

    Now, if there's no reply from skeletonofchaos for a couple weeks (I'll PM him or something in the next day or two now that I'm done rambling in this thread, in case he notices that more than posts here) and there's decent demand for further work on a plugin like this, I'll have to go and see what can be done to submit a working version with permissions whenever I can actually figure out how to add that. Because at that point I consider the ethical value of giving people something they benefit from greater than adhering to legalities to the letter.

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


    First off I do not appreciate the "Because at that point I consider the ethical value of giving people something they benefit from greater than adhering to legalities to the letter." That being said feel free to contribute. If you post links to the "fixed" file and want to update this feel free to! I would prefer to keep in under my name but if you want to help maintain it I would appreciate it and of course give you credit for doing such.
  7. I can understand why you wouldn't appreciate that, certainly, although I doubt either of us will agree with the other's point of view unless we engage in lengthy debate on the subject. In all honesty though, if you had abandoned this plugin, in the long run, I would've probably done the more legal thing and recoded it from scratch.

    I'll PM you first to show you what I did to get it working on my end - I'm a lot crappier of a coder than you are, I suspect, so it would probably be best if you see the 'fix' first, and then comment on whether or not you can think of a better way to do what I did or not.

    In the long term, I was hoping to see if I could manage to add code for all other utilities (brewing stand, enchantment table, furnace, etc), although my first try at adding a furnace failed miserably.
  8. Greetings all, after a little bit of chatting with skeletonofchaos, we've decided that for the time being I'll posting links to newer versions of this plugin for the time being, and whenever he has the time he'll incorporate the changes into the official package.

    So, here you go:

    As users of this may notice, the file is called "PocketUtilities.jar" now, instead of "PocketCraft.jar", so if you have an older version, delete the "PocketCraft.jar" from your plugins directory to ensure there aren't conflicts (shouldn't be, but you never know).

    Also, I just added experimental support for superperms - haven't had a chance to test it yet though, so if someone could do me a favor and let me know if the permissions node works correctly, I'd appreciate it. The permissions node for being able to use the portable crafting table is:


    [Edit: Confirmed permissions as working on two seperate servers - running the current recommended builds of Minecraft, Spoutcraft, Spout, and Bukkit (the ones correlating to minecraft 1.0.1). Ops automatically have the permission, non-ops with the permission node running spoutcraft can open the crafting table menu, non-ops without the permission node cannot. As it should be.]

    Have fun to whoever uses this.

    I'll keep adding updates in new posts to this thread as I manage to add new features, which may be anytime from later this weekend to never, depending on how much time and motivation I have to experiment with adding other stuff to the plugin.
  9. Offline


    I for one, applaud you MentalistTraceur, as this is one plugin that I actually was disappointed when it came up with errors in the console! I thought there was no hope :D. Also, kudos to you skeletonofchaos for allowing Mentalist to continue this. [diamond]'s and [cake] to you both!

    I look forward to future versions :)

    BTW It works in CB RB1846
    Also, Can I recommend using Dropbox to host your files. It is, I believe more reliable, and, you can always keep a history of files on there for as long, as, well, ever :p. Dropbox. Free 250MB if you use this link BTW :)
  10. Thanks Spacey_Puppy. As for Dropbox, it seems people happen to particularly like it here on Bukkit, so whenever I get the next version ready, I'll go ahead and use dropbox to upload.

    For anyone curious: I'm currently trying to get a portable furnace added, and have been intently constantly trying to do this for the last two days, and I can see why no other plugin (that I've been able to find) has done it - it's a horrible PITA. Doesn't help that I don't know much about how exactly Minecraft works internally, so it's largely guesswork as to how I'm supposed to be making things happen. My understanding is that furnace functionality is tied to the furnace block at least somewhat. And if that understanding is correct, there may be very little I can do short of getting the help of someone vastly more skilled at this. Also, as I understand it that while the function of the Crafting Table hinges only on it's respective Container class, furnaces and other blocks that do something to an ItemStack over time depend primarily on the workings of their respective TileEntity class, and quiet possibly other classes/code that I don't understand the workings of. Currently, I've gotten as 'far' as having the furnace screen come up, and you can put items in it, but the actual 'burning' won't start (which is progress vs. what I had just a few days ago, but not by much). (Also, before a 'PocketFurnace' is truly perfect, I'd have to find a way to save the contents and state of the furnace to file/database, so as to make the PocketFurnace contents/burn-state save between server restarts.)

    *Headdesk* I might end up seeing if I can add something else (Enchantment Table seems like it works similarly to the Crafting Table enough to make that be a lot easier to add - I don't know how much that applies to the bookshelf functionality though).
  11. Offline


    Hey quick idea for you. Try changing this to more of a "remote" furnace/crafting table/enchantment bench/chest. This way players would only be able to access what they already have and could use anything remotely. This is where I was heading before I discontinued this. Also I recommend using MCP to look at Minecraft source so you know what obfuscated functions to call.

    Also can you please start this on Bukkit dev just add me as the original author there and you as the other author. This way you can update it yourself. Thanks for maintaining this.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  12. Hmm, I'll think about it. I think the appeal of this plugin for some people might be that you don't have to ever craft a crafting table, furnace, etc - just have them innately. If at all possible, I'd like to make it not tied to in-world blocks, although if people are interested a separate 'RemoteUtilities' plugin could probably be made... I'm also not sure what happens, if, say, you make a furnace, and have it 'tied' to your player for the 'remote' access, but then travel so far away that the chunk in which the furnace is stored is unloaded. One good thing is the Spout development team is intending on having their own versions of all the UIs (crafting table, furnace, etc, etc) in the future, which would hopefully mean when that's ready, this plugin could simply migrate over to that. On the other hand, the problem is that when that time comes, those features will be in Spout's own standalone server, and if that was done we'd have to move this plugin from Bukkit to Spout's server... so ideally a Bukkit solution can be found as well, because I wouldn't want to abandon people who insist on still using Bukkit when Spout's server ready.

    I'll take a look - I've been decompiling Minecraft source myself for reference (my understanding is that this should be no less legal than using MCP, anyone is welcome to correct me if they're sure I'm wrong in that regard), but it's possible this MCP thing produces more understandable source.

    Sure thing - I'll do it as soon as I make some progress with this furnace thing (or, failing that, as soon as I add something else worth adding, such as separate permission nodes for being able to use the Crafting Table always, or only when one is in your inventory.
  13. Offline


    I installed Pocketutils now.
    Had no Errors when pressing C now.

    may you add a Configurable Key

    and i discovered a "bug".
    i use SpoutLWC.
    And when i change an owner of a chest that contains "c" the Crafttable pops up and i cant get into the SpoutLWC menu again (have to reconnect to "fix" that). I tested SpoutLWC menu with mcMMO which is "m" for me and this worked fine without interrupting the current menu.

    if you can fix that i would be happy :)

    very useful so far :)
  14. I'll make the keys configurable eventually, it's on my list of things I'd like to do - right now, with the latest Bukkit and Spout recommended build, the entire key press event listener is using deprecated APIs, so I'll probably soon be forced to redo the keypress listener code, and when I do that I'll look into making it configurable.

    Interesting, and I'm not 100% sure if I could fix this universally, beyond making the keys configurable and hoping people configure them in a way that doesn't conflict. This'll probably take me a lot longer to fix, I think.... But if I have the time and ability, I will.
  15. Offline


    thanks anyway for taking notice :)
  16. Actually I think I may have just found a solution (took a break from the furnace problem to A. work on another quick plugin idea I had and at the same time B. look into how I'm supposed to do key press listening/binding in a non-deprecated manner, and in the process of looking through Oloth's SpoutFlight source, I stumbled upon what might just be answer the answer to this problem), I'm not 100% sure, but it /should/ work. However, interestingly enough, spacey_puppy's Dropbox referral link is redirecting me to Google, and the site isn't letting me log in with my credentials for this forum (unless I suddenly forgot what my password to this site is, which is conceivable, but unlikely), which as I understand it, is the login information that's supposed to let me sign in to So once I get a Bukkit Dev page for this plugin setup, I'll make sure the probably-fixed version is available for download, and post here notifying it.
  17. Offline


    feel free to share the file with me.
    i could test it and may give you some info's again before releasing.

    you can use this link for signing into dropbox

    just 2gb but for plugin releases it's pretty much the easiest way.
    just drop the file in the folder -> right click after full sync -> copy link.
  18. Offline


    On the onkeypressed event use a:
    if currentscreen==gamescreen
    DO NOT USE my old emthod of making sure its not any of the other screens. This should fix that problem. (I'm here to provide verbal support for all my plugins even if I do not update them myself).

    If you changed that it should remove the problem. Sorry for leaving some somewhat useless code in my plugin.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
    martinherrmann likes this.
  19. martinherrmann, your link is also taking me to google, so I'm starting to think maybe there's some url obfuscating setting set to on by default somewhere that I forgot to disable...

    skeletonofchaos, yeah, that's the solution I went with, and what I was talking about when I said "I think I found a solution" - although I'm allowing it to work for a few other screens than just "gamescreen", namely "player inventory", "furnace inventory", "dispenser inventory", and "chest inventory", because I've had quiet a few use-cases where I'll press E and then remember that I wanted to go to crafting table screen, so I think that, when player is already in an inventory screen, it makes sense for them to be able to switch to another inventory screen without having to exit to game screen first. It seems spout API doesn't have a special screentype constant predefined for enchanting table screen, brewing stand screen, and jukebox screen, so I'm not sure how easy it'll be do check for those.

    Anyway, I just made a bukkit dev page for this plugin, and will soon upload a .jar file of the current version to that (will post link to dev page when I do, although I'm not sure if I need to make it so that people can see it without being logged in as me first). And if you can't download from bukkit dev until the plugin is approved, I'll upload the next .jar file in some way up here anyway, dropbox or not, so you guys can get your hands on it sooner.

    Current features:
    As said above, crafting table now only opens when you press C (or other configured key, see below) from a few places, namely the various inventory screens and the normal in-the-middle-of-the-game-nothing-open screen. So this should avoid any conflicts with the screen popping up over other windows - if some plugin somehow implements text boxes inside standard inventory screens and that breaks things for anyone, please let me know, but I don't think it should. I think this mainly because standard inventory screens are hardcoded so I think any such inventory screen changes would actually be a different screen looking like the stock ones, not instances of the stock ones, and thus spout would return "customscreen" for getScreenType().

    Permission nodes split into "pocketutils.workbench.always" and "pocketutils.workbench.inventory" - the former lets the user open the crafting table screen at any time, the latter, only if they have a crafting table already in their inventory. When I implement other utility blocks, this same system will be used: "pocketutils.[blockname].[always/inventory]". There's no pocketutils.*.always, or pocketutils.*.inventory nodes yet, although if possible, I will implement that too if people want them once there's more blocks than crafting table supported.

    What key needs to be pressed to open the crafting table is now configurable by each user individually for themselves in their spoutcraft client's controls menu. The default is C for Crafting Table, and will be F for Furnace, B for Brewing Stand, T for Enchantment Table, and J for Jukebox. I'll eventually make the default keys configurable server-side, although I doubt most people would ever need to bother altering the default keys, since each user can tweak what keys to use on their end anyway. It'd only be an issue if you know you have multiple plugins where the default keys would conflict, and don't want to mess up your users too much.
  20. Offline



    thats why i postet the url in text..
    i thing there is some obfuscating..

    just google dropbox.
    i dont want that referral bonus and shit.
    just use it. its very handy to use for anything sharing a file related (you can even link folders with other users so just drop the file and the other user gets the file in his linked folder in realtime. also for free users)
  21. How's this link for everyone? Can you view it, or does it ask you to log in or somesuch? If it works, you should be able to download the current version of the PocketUtilities.jar file form there.
  22. Offline


  23. Awesome. Feel free to report bugs, if there are any, either here in the thread or there.

    Also, everyone give a nice big thanks to skeletonofchaos for graciously allowing the source code to be available under the MIT license. I'll try to get around to putting up the source soon.
  24. Offline


    Thx to you both! :)
    It doesn't interrupt the lwc guy. And the key config is also nice!
    You may just format the dev page better so the permission nodes are better listed and sperated and the custom key function is marked.

    Have a nice day and big thanks, my users will appreciate that plugin.
  25. I appreciate that suggestion - you're right, it could be formatted better.

    I'll edit it when the next version goes up, or when I get the source code posted, or somewhen around then - I just made a breakthrough with the portable furnace code today, so a portable furnace might actually be possible somewhat soon.

    Glad to know I could contribute to making people happy. :)

    Alright, I have the pocket furnace almost working, at least I think. The current situations is, items will go inside it, fuel will be burnt and items will be cooked/smelted, and the result item will be produced. However, the furnace only updates on every new open of the Pocket Furnace screen. A single furnace entity is remembered by the plugin for player (based on player name) - players can disconnect and reconnect and their furnaces aren't lost, but currently I haven't implemented any saving of the data, so every restart of the server or reload of the plugin will loose the state and contents of players' furnaces.

    I'm almost 100% certain that the only thing left to do is to figure out how to execute a certain piece of code once every # ticks/milliseconds/whatever, where # is filled in with whatever a reasonable time interval is to get performance visibly similar to that of normal furnaces. As I first write the code, the pocket furnaces will end up smelting even while the player is offline - I think this isn't ideal behavior for a 'pocket' furnace for some server owners, since the idea can be that it's a 'part' of the player, and shouldn't smelt when they're offline - others, on the contrary, might think that's exactly how it ought to work, so I'll eventually make that configurable.

    Saving the data to disk and loading it again shouldn't be too hard once the furnaces are working otherwise, although I don't know how ram intensive my plugin would be on a server with hundreds or thousands of users - currently it'll try to load/hold/save ALL known players+furnaces into memory at once, which may be an issue in the long run for big servers, or small servers with a large rotating userbase. As time permits, I'll learn how to code various basic optimizations on top of that (i.e. keeping a database and only loading up the furnaces for players when they're signed in, and saving them to database and unloading as soon as appropriate).

    Anyway, if any coders have any suggestions for what the most efficient way to do the first task I mentioned is - running a piece of code every # of time units of some sort - please speak up. I know Bukkit has a scheduler and I'll likely end up using a runnable with scheduleSyncRepeatingTask(), but I don't know if there's possibly more efficient ways to do it, since all I need to run every interval is a for loop iterating over every element of the array of furnace tileentities I have and calling a function in each one of them.

    I went ahead and implemented scheduleSyncRepeatingTask() with a 10 tick delay (so it updates the furnace UI twice a second so long as the server isn't lagging horribly) and although I wasn't able to test this latest version with anyone else (everyone who plays on my private server other than me is long asleep by now), it seemed to work fine.

    The portable furnace UI updates in just slightly longer increments than the normal one because I used a 10-tick delay, but the difference is so slight you shouldn't be able to see it unless you sit there counting the jumps in the furnace progress arrow. (The furnace's ACTUAL speed is still EXACTLY the same though - just the visuals update a tiny bit slower.)

    Finally, I changed the default key binding for the furnace to U instead of F, because I remembered the default fog/render-distance toggle is F, and I don't want to mess users up. Since each user can configure their PocketUtils key bindings for themselves anyway, they can always put PocketFurnace on F and move render distance toggle to some other key if they want (which is what I personally do on my Spoutcraft client).

    I'll upload this 'beta' portable furnace supporting version sometime soon. I'll say on here when I do. Keep in mind that everything I said in the last post still applies - so if you do give users either the pocketutils.furnace.inventory or pocketutils.furnace.always permission nodes, warn them that for the time being, the furnace doesn't save contents in-between server reloads, so if you have to reload the server and they have stuff left in the pocket furnace they'll loose it.

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


    Nice job.
  27. Newest version of bukkit's recommended build (1.1-R6) seems to have changed some function names around in the net.minecraft.server namespace classes.... Not sure if that was supposed to even happened, and I'm seeing a lot of plugins break as a result.

    For the time being, the beta version of PocketUtilities with furnaces for RB 1.1-R4 is available for download on the Bukkit Dev page.

    Okay, I'm pretty sure I have a version of PocketUtilities source that will probably work with 1.1-R6, but for the time being, since a Recommended Build of Spout isn't released for CraftBukkit 1.1-R6, I'm going to wait until that's out (if someone's running the development build of spout and that's ready for CraftBukkit 1.1-R6 let me know and I'll upload a hopefully 1.1-R6 compatible version of the furnace-supporting beta as well.

    I just realized it's not automatically easy to find the furnace-supporting beta on the Bukkit Dev page. Since I uploaded it as a beta, you have to go into Files and manually select it - just pressing the download link from the main page takes you to the one that doesn't have pocket furnaces. The download page for the furnace-having beta is:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  28. Update time: I have uploaded 2 more beta builds to the Bukkit Dev page. One is for 1.1-R4, because Spout's recommended build is still on that as far as I can tell so I can't drop 1.1-R4 yet, and one is for 1.1-R6. People using 1.1-R6, 1.1-R7, or the 1.2-whatever builds, if you're using development versions of Spout Plugin that work with those builds, please let me know if you have any problems with it.

    So I've implemented somewhat working furnace saving. Basically, furnaces save state and contents now, even if plugin is reloaded or server is restated. It's a bit glitchy (I think you'll loose enchantments if you try to store an enchanted item in the furnace during a reload, and the fuel consumption seems to be a bit off on restart), and the plugin is still not resource/memory efficient on large-userbase servers. But furnaces do save. They save in tiny little files (currently 44 bytes, will be more once I figure out how to save enchantment data), at plugins/PocketUtilities/furnaces/[username]. The information is just a few integers relevant to the furnace tile entity class, written as raw bytes, which my code then uses to reconstruct the pocket furnace.

    No file extension, though I can make it have one if people really want them to have file extensions.

    Anyway, files here:
    Make sure you download the right one for your bukkit/spout build.

    Also, do people want me to add completely Spout not-requiring support for using commands to bring up the PocketUtilities UIs?
  29. Hello everyone, I want to sincerely apologize for being gone for a couple months. College was hell for the second half of the Spring semester - one of the classes required practically constant coding of apps for the Android OS.

    I'm not sure if people still want/use this plugin - if you do, please speak up. Either way, I like it and want to keep using it, so I will update it whenever I have time time again - I hear A. CraftBukkit has a new inventory framework I should look at and B. Spout's own server has development builds coming out now, which might mean I should start developing for that - unless better developers than I have started to make equivalent plugins for those systems, I will do my best to release versions of this plugin compatible with both of those as soon as I have the time.
  30. Newer version finally up on bukkit dev (well, pending approval). This only adds one thing: Pocket Enchantment Table (and the permissions to go with it). Standing next to bookshelves should increase the level of available enchantments. Plugin-added custom crafting recipes should now work with pocket crafting table. YAY.

    Furnaces are still as much beta, as before.

    Thanks go to the spout API developers for getting their API working right, so I don't have to make a custom class inheriting from the Notch-ian code, for Enchanting and Crafting tables.

    Quick note: The 1.3 update I uploaded to Bukkit Dev has yet to be approved, so in the meantime, you should, I think, be able to download it by going here:

    Also, in all fairness, my thanks @ the Spout API also extend to the Bukkit developers, since the Spout plugin API is in turn dependent on Bukkit APIs, I think.

    Version 1.3 of PocketUtilities got approved as of around an hour ago. And I just uploaded a beta release, version 1.4-brewing_stand_beta - which might also take a while to be approved.

    Version 1.4-brewing_stand_beta adds Pocket Brewing Stand, in the same state of works-kinda-ness that Pocket Furnaces are in. (I.e. saving between server reboots/plugin-reloads is broken, and it will memory-leak over time in proportion to how many users the server has that use their pocket brewing-stands/furnaces).

    I will correct both of those issues as soon as I can.

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

Share This Page