Made an "Inventory Blacklist" Mod

570 views
Skip to first unread message

Joe Allington

unread,
Mar 12, 2015, 9:48:29 PM3/12/15
to minecraft...@googlegroups.com
Hey folks!  As a small side project, I made a basic "inventory blacklist" mod for the Minecraft classes I'm running, and thought I'd share it.  The mod allows you to specify items and blocks that players will be unable to use.  If a restricted item ends up in the inventory by any means, it is immediately removed.


It's compatible with MinecraftEdu 1.7.10, and it only needs to be installed on the server, not on the clients.

The mod is labeled "Utility" instead of "Inventory Blacklist" because I really enjoyed making the mod, and I'm interested in adding more little server-side features in the future.  If anyone has any nominations for mod features they'd like to see, or if you have feedback (or bug reports) for the "Inventory Blacklist" feature, please let me know.

Cheers!

Jonathan Odom

unread,
Mar 31, 2015, 9:00:41 AM3/31/15
to minecraft...@googlegroups.com
Is there anyway to check for which items are already on the blacklist(in order to remove them easily) or is there a list of names of each item. For example, I was able to Blacklist "Potion" which blocked them ALL. However, we only wanted to blacklist the Invisibility Potion, Poison Potion, or other harmful Potions. The trick for me is, when I go to do the Invisbility Potion - referred to in-game as "Potion of Invisibility", I can't specifically blacklist this item. Is there somewhere or can there be somewhere to include a proper list of the item names in order to blacklist them? I tried 'Potion of Invisibility', 'Potion_of_Invisibility', 'Invisibility Potion', 'Invisibility_Potion', 'Invisibility', and I tried them all using only lower case letters but got none of them to work. The only one in regards to potions I could get to work was 'Potion'.

Any help on either of these two matters would be greatly appreciated!

Halligator1

unread,
Mar 31, 2015, 12:34:39 PM3/31/15
to minecraft...@googlegroups.com
Could you instead of snowball use the ID number of snowball? I haven't tested this yet, but are planning to do so during the holidays.

Joe Allington

unread,
Apr 1, 2015, 3:18:19 PM4/1/15
to minecraft...@googlegroups.com
The ID number works as well as the name.  The only confusing thing right now is that it says "332 added to blacklist!" instead of "snowball (ID 332) added to blacklist!"  I'm going to fix that in my upcoming update, as well as add the ability to specify metadata.  (So that, for example, you'd be able to ban a specific color of wool, whereas presently you can only ban all wool simultaneously.)

Joe Allington

unread,
Apr 1, 2015, 3:20:13 PM4/1/15
to minecraft...@googlegroups.com
Jonathan, those are both good suggestions.  In my next update, I'll be adding (a) the ability to list currently blacklisted items/blocks, and (b) the ability to specify item "metadata", which'll allow you to ban a specific potion, as opposed to all potions at once.  I'll post a notice on this thread as soon as I've got the new version available for download.  Cheers!

Joe Allington

unread,
Apr 3, 2015, 8:48:54 PM4/3/15
to minecraft...@googlegroups.com
OK, I just released an update.  Here's the new features:
  • You can now specify either item name or item ID to add/remove blacklist entries.  (Hal, my earlier claim that this was already a feature was a mistake; it did not actually work properly in the old version.  My bad!)
  • You can specify a metadata value to ban specific types of an item, as opposed to all varieties of an item at once.  (Jonathan, this will solve your potions issue; more info below.)
  • Using the command "/invbl list" will show you all currently blacklisted items/blocks, as well as all currently exempt players.
The manual and download link are available here:

A tip: to see the item ID and metadata value of a block or item in the game's inventory, press SHIFT and H and F3 all at the same time while in-game.  (The three keystrokes really have to happen simultaneously; it's the weirdest shortcut ever.  It will also bring up a bunch of game data, including a big pie chart.  Press F3 to hide all that.)  You should now be able to see a number when mousing over things in the inventory.  The ID is the number after the "#" symbol; the metadata comes after the "/" symbol, if the item/block has metadata at all.

Jonathan, to save you the trouble of transcribing all those metadata numbers, I've made a config file you can load into your server that has all "bad" potions blacklisted.  This includes both the individual and splash varieties of: poison, weakness, slowness, harming, and invisibility.  Here's a link to the config file:


Your config file is located in your minecraftedu directory, under minecraftedu/servertool/server/config/MFY-Utility.cfg.  If you download this "NoBadPotions" file and replace your existing config file with it, be sure to rename the file from "MFY-Utility-NoBadPotions.cfg" to just "MFY-Utility.cfg".  Or, you can just copy the list of potions and paste it into your own config file, if you've already started setting up other blacklist entries in your original config file.

If anyone has any other questions or suggestions for future features, let me know.  Cheers!

Jonathan Odom

unread,
Apr 23, 2015, 3:20:19 PM4/23/15
to minecraft...@googlegroups.com
Thanks Joe for all of your work! I was finally able to get this installed this past week and when their after school Minecraft Club came around, the server kept crashing. Is this a known issue with this new version of it? I never had any issues like this with .0.0.1.. So if you could give any insight as to why this may be happening or if this is a possible bug with version .0.0.2, that'd be greatly appreciated! In the meantime, do you know how I can remove this version from the Mod File so it doesn't crash the server? I've already deleted it from it's location in the Minecraft Folder, but it is still showing as being Imported into the Minecraft file.

Any help would be greatly appreciated!

Halligator1

unread,
Apr 27, 2015, 5:12:56 PM4/27/15
to minecraft...@googlegroups.com
I am unfortunately having the same problem as Jonathan. The game crashes as when trying to use certain items. Is there any way we can help you with logs or anything, I would be happy to help, since I love your development, and I could really make use of your mod.

Hal

Joe Allington

unread,
Apr 27, 2015, 5:40:35 PM4/27/15
to minecraft...@googlegroups.com
Hey folks,

Thanks for the feedback, I'll try and get a fix ASAP.  However, I'm having trouble replicating the bug.  I've tried builds 11, 12, and 18, blacklisting and unblacklisting various items, and haven't gotten it to crash yet.

Jonathan and Hal, could you give me some more details on the situation so I can try to find the bug?
  • What version of MinecraftEdu are you using?
  • What other mods are you using?
  • Is the MFY-Utility mod installed just on the server, or on both the server and the client?  (It should just be the server)
  • How many players were logged in when it crashed?
  • What item/block/command seems to be causing the crash?

Halligator1

unread,
Apr 28, 2015, 3:36:37 AM4/28/15
to minecraft...@googlegroups.com

  • What version of MinecraftEdu are you using? I have tested it on every version from build 12-18. I have not tested your 0.0.1 version however. This issue is on the 0.0.2 version
  • What other mods are you using? The mod that is causing the issue for me is Bibliocraft 1.10.4 (And it happens when attempting to put the tools there in my inventorylist)
  • Is the MFY-Utility mod installed just on the server, or on both the server and the client? only on my server
  • How many players were logged in when it crashed? just me
  • What item/block/command seems to be causing the crash? The tools, like screwdriver, hand drill and so on

Hal 

Jonathan Odom

unread,
Apr 28, 2015, 11:26:15 AM4/28/15
to minecraft...@googlegroups.com

I'm providing my answers in same format to make it easier for you. I didn't get as far as he did though, once I click to start Minecraft Edu Server, it opens and crashes immediately.

  • What version of MinecraftEdu are you using? We currently use 1.7.10 Build 12. I haven't tested it on any other versions.
  • What other mods are you using? None. I currently have 2 mods installed and they are the two different versions you have supplied within this thread.
  • Is the MFY-Utility mod installed just on the server, or on both the server and the client? Only on the server.
  • How many players were logged in when it crashed? None. Server won't even completely boot up before it crashes.
  • What item/block/command seems to be causing the crash? N/A. Only Potions were blocked in 0.0.1, didn't get the chance to block anything in 0.0.2.

Jonathan Odom

unread,
Apr 28, 2015, 11:29:15 AM4/28/15
to minecraft...@googlegroups.com
I just removed both mods and reinstalled 0.0.2 and my server is currently up and running.. I'm going to see if I can get the class in the lab now to test it for me.

Sarai Stetson

unread,
Apr 28, 2015, 2:30:55 PM4/28/15
to minecraft...@googlegroups.com
I'm running build 1.6.4 and downloading this crashes me. Is there a version compatible with what I'm running?

--
You received this message because you are subscribed to the Google Groups "Minecraft Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minecraft-teach...@googlegroups.com.
To post to this group, send email to minecraft...@googlegroups.com.
Visit this group at http://groups.google.com/group/minecraft-teachers.
To view this discussion on the web visit https://groups.google.com/d/msgid/minecraft-teachers/7790cb3a-fe3d-423d-97a5-45e1e102e3bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Allington

unread,
Apr 28, 2015, 3:33:10 PM4/28/15
to minecraft...@googlegroups.com
Found the bug!  Here's a download link to the fixed version:


The bug had to do with how certain mod items are named.  I've tested it with Bibliocraft and a couple of other mods (AnimalBikes, Biomes o Plenty) and it's all worked fine.  Let me know if any other mod causes crashes, and I'll take a look into that mod's item/block naming scheme and patch my mod to make it compatible.  (But I'm betting/hoping that other mods don't use symbols in their names.)

NOTE: If you're wanting to blacklist a mod item (as opposed to a vanilla Minecraft item), you need to use the ID number, not the name.  (The ID number may change as you add/remove other mods, but the item will remain blacklisted properly.)

Thanks for the bug reports, let me know if anything else comes up!

Joe Allington

unread,
Apr 28, 2015, 3:36:32 PM4/28/15
to minecraft...@googlegroups.com
Hi Sarai,

The mod is currently built for 1.7.10, so loading it into 1.6.4 likely won't work.  I intend on creating a 1.6.4 version but I can't guarantee a delivery date.  Possibly this week, more likely next week?  Sorry, been kind of swamped recently :(


On Tuesday, April 28, 2015 at 11:30:55 AM UTC-7, Sarai Stetson wrote:
I'm running build 1.6.4 and downloading this crashes me. Is there a version compatible with what I'm running?
On Thu, Mar 12, 2015 at 9:48 PM, Joe Allington <joe.can...@gmail.com> wrote:
Hey folks!  As a small side project, I made a basic "inventory blacklist" mod for the Minecraft classes I'm running, and thought I'd share it.  The mod allows you to specify items and blocks that players will be unable to use.  If a restricted item ends up in the inventory by any means, it is immediately removed.


It's compatible with MinecraftEdu 1.7.10, and it only needs to be installed on the server, not on the clients.

The mod is labeled "Utility" instead of "Inventory Blacklist" because I really enjoyed making the mod, and I'm interested in adding more little server-side features in the future.  If anyone has any nominations for mod features they'd like to see, or if you have feedback (or bug reports) for the "Inventory Blacklist" feature, please let me know.

Cheers!

--
You received this message because you are subscribed to the Google Groups "Minecraft Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minecraft-teachers+unsub...@googlegroups.com.

Joe Allington

unread,
Apr 28, 2015, 3:43:47 PM4/28/15
to minecraft...@googlegroups.com
Jonathan, taking a second look at your description of the bug, it sounds like you were dealing with something different than what Hal was dealing with.  I'm thinking that MinecraftEdu's mod loader got confused one way or another.  I've had this sort of thing happen, where the config file doesn't properly update.

If that's the case, doing a clean uninstall/reinstall of the mods was probably the right move.  But let me know if there's still a problem, and I'll look into it.

On Tuesday, April 28, 2015 at 8:29:15 AM UTC-7, Jonathan Odom wrote:

Halligator1

unread,
Apr 28, 2015, 5:41:58 PM4/28/15
to minecraft...@googlegroups.com
Great job. I think you got it.
Works like a charm :)
Thanks a lot.

Joe Allington

unread,
May 11, 2015, 8:56:21 PM5/11/15
to minecraft...@googlegroups.com
Hey folks, I've made an updated version of the Utility Mod.  This is just a quick fix, no new features.  The download link can be found at the main page:


The Bug:  If you tried to ban/unban something with a metadata value, using the thing's name worked (e.g. wood:2), but using the thing's ID number did not work (e.g. 17:2).  This has now been fixed.  (This is important for mod items, since you can currently only blacklist mod items through ID numbers, not names.)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages