Warehouse Tweaks

Discuss anything you want about Minecraft here including our own servers
User avatar
Vusys
Apprentice
Apprentice
Posts: 11
Joined: Fri Apr 11, 2014 5:21 am

Warehouse Tweaks

Tue Jan 02, 2018 6:32 pm

Image

The in-game commands for the warehouse are very verbose and the web interface is a little lacking. I whipped this little tweak up on the weekend and thought I'd share given how useful it's been to me so far. It takes over a URL that isn't used and creates its own rendering of what's in your warehouse. It's not very polished but gets the job done.

N.b. Some images may be broken. A number of them have differing file names (e.g. Redstone Dust vs Redstone, and Terracotta vs Stained Clay). I've fixed most of them but there may be some items that also have this issue that I don't know about.

Instructions
  1. Install Tampermonkey (Only tested in Firefox and Chrome. Other userscript addons like Greasemonkey are probably fine too)
  2. Open this gist
  3. Click Raw at the top right
  4. Click Install
  5. Navigate to https://warehouse.renmx.com/v2. You have to be logged in and authenticated for this to work otherwise you'll get a white page.

Edit: This is in the wrong forum ._. Can someone please move into minecraft general? Thanks.
User avatar
Pri
Site Admin
Site Admin
Posts: 5321
Joined: Fri Dec 14, 2007 8:59 am

Re: Warehouse Tweaks

Wed Jan 03, 2018 5:03 am

Great tweak Vusys, very cool. By the way I don't know if you're aware of this but there is a JSON API for Auctions, Shop and Warehouse. http://warehouse.renmx.com/json.php

I dunno if you want to do something with that or not :)
Image
User avatar
freakboy31
Supporter
Supporter
CPU: i7-7700HQ
RAM: 16GB
Motherboard: -
GPU: GTX 1050Ti 4GB
Display: -
Cooling: -
Location: Pacific Ring of Fire
Posts: 2084
Joined: Thu Oct 27, 2011 2:58 pm

Re: Warehouse Tweaks

Wed Jan 03, 2018 10:36 am

Cool
I'm SUPPORTER and was the first Asian and youngest staff member.
Image
freakboy31
Epic Crafter since Nov 2013 / Server moderator from June 2012 - October 2017??

Player Spotlight delayed!!
User avatar
Vusys
Apprentice
Apprentice
Posts: 11
Joined: Fri Apr 11, 2014 5:21 am

Re: Warehouse Tweaks

Wed Jan 03, 2018 6:04 pm

Pri wrote:
Wed Jan 03, 2018 5:03 am
Great tweak Vusys, very cool. By the way I don't know if you're aware of this but there is a JSON API for Auctions, Shop and Warehouse. http://warehouse.renmx.com/json.php

I dunno if you want to do something with that or not :)
Yes, that's what I'm using. Was originally parsing the DOM but that's ugly and gross. It's also the reason why I have to rewrite some of the image URLs - the API's names differ in places from the image URLs, there's no 301, fallback for old names, and the API does not provide the image URL :(

Edit:

On a bit of a tangent, the shop API is currently not working for me. It takes 13s to return a HTTP 500.
User avatar
Pri
Site Admin
Site Admin
Posts: 5321
Joined: Fri Dec 14, 2007 8:59 am

Re: Warehouse Tweaks

Thu Jan 04, 2018 3:54 am

Yeah there's some bug with it, I'll look into it. Also I will modify the warehouse API to give image urls :)

EDIT1: Warehouse image url change done.

EDIT2: Shop API is working now: http://shop.renmx.com/json.php
Image
User avatar
Pri
Site Admin
Site Admin
Posts: 5321
Joined: Fri Dec 14, 2007 8:59 am

Re: Warehouse Tweaks

Thu Jan 04, 2018 9:19 am

Vusys, I've been thinking a lot about the Warehouse interface. The fact is, I just don't have the time needed to make any kind of decent interface for the Warehouse, I'm not great at Javascript either. But I thought I could help you with your script so I created a new page here: http://warehouse.renmx.com/submit.php?c ... uantity=12

Which will allow you to have buttons on your scripted page to directly retrieve things from warehouse to main inventory in-game. I was thinking you could add like a quick retrieve button for common quantities and perhaps a slider for custom quantity selection. You can get the csrf token from the json.php (it now appears at the top) this token is unique for each account so you can retrieve that during page load and then include it with all button submissions.

If there is a way for me to just host the code on the server itself so people don't need to install tamper monkey and the script that way I'm happy to do that and to credit you for the pages creation :)
Image
User avatar
Vusys
Apprentice
Apprentice
Posts: 11
Joined: Fri Apr 11, 2014 5:21 am

Re: Warehouse Tweaks

Thu Jan 04, 2018 7:16 pm

I've made an update that fixes the script breaking because of API changes and also introduces buttons to get items.
User avatar
Vusys
Apprentice
Apprentice
Posts: 11
Joined: Fri Apr 11, 2014 5:21 am

Re: Warehouse Tweaks

Thu Jan 04, 2018 7:28 pm

Pri wrote:
Thu Jan 04, 2018 9:19 am
Vusys, I've been thinking a lot about the Warehouse interface. The fact is, I just don't have the time needed to make any kind of decent interface for the Warehouse, I'm not great at Javascript either. But I thought I could help you with your script so I created a new page here: http://warehouse.renmx.com/submit.php?c ... uantity=12

Which will allow you to have buttons on your scripted page to directly retrieve things from warehouse to main inventory in-game. I was thinking you could add like a quick retrieve button for common quantities and perhaps a slider for custom quantity selection. You can get the csrf token from the json.php (it now appears at the top) this token is unique for each account so you can retrieve that during page load and then include it with all button submissions.

If there is a way for me to just host the code on the server itself so people don't need to install tamper monkey and the script that way I'm happy to do that and to credit you for the pages creation :)
Thanks for the extra API stuff. I’m now using the images and I’ve added some buttons for grabbing items.

Been mulling it over today, and I think it’s probably best to stick as a third party userscript. I could make some changes to make it work naively by switching to the main site’s version of jQuery and Bootstrap, but it’s not a good solution. It would be a weird mix of being both first party and third party and would really end up being the worst of both worlds. I’d rather help out by contributing directly to the site or just stick to my own unofficial addons. I can appreciate why you wouldn't want the former and it's not like I could commit to delivering anything massive.

I didn’t mean to disparage or cast a shadow on your work. I am just naturally inclined to tinker with things. :)
User avatar
Pri
Site Admin
Site Admin
Posts: 5321
Joined: Fri Dec 14, 2007 8:59 am

Re: Warehouse Tweaks

Fri Jan 05, 2018 1:28 am

Okey dokey :)
Image

Return to “Minecraft General Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests