Removing dropped items

5,596 views
Skip to first unread message

David Hawkins

unread,
Feb 8, 2016, 11:06:55 AM2/8/16
to Minecraft Teachers
I attached a command block to a repeater with the following command:

kill @e[type=Item]

It did not destroy any dropped items. 



I then tested that same command via the command line. It killed me. 

After a bit of research I think this is not an available command in 1.7.1


So my question is: How can I destroy all dropped items immediately or prevent players from dropping any items?

Robijn Vogel

unread,
Feb 9, 2016, 11:49:26 AM2/9/16
to Minecraft Teachers
There is a neat small Minecraft Mod for this, called Lagfix. I can not guarantee you that it will work with McEdu though.

Joel Levin

unread,
Feb 10, 2016, 9:07:24 AM2/10/16
to Minecraft Teachers

There is command you can use if WorldEdit is installed on the server.
/remove items <radius>

So if you wanted to get rid of all dropped items within 100 blocks of where you are standing, you'd do '/remove items 100'.

Unfortunately, I don't believe you can put that into a commandblock. You have to type it.

~Joel

Matt Coia

unread,
Feb 10, 2016, 2:07:25 PM2/10/16
to minecraft...@googlegroups.com
Matthew (Robijn),

I just tested that lagfix mod out and it seems to work great.  I set up a command block with the command /nukeitems and activated it with a redstone clock.  The default radius is 32 blocks (but you can set it larger or smaller).  Worked great for what David was looking for.  Items I dropped were gone before they hit the ground!

Thanks for the tip!
Matt 

--
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 https://groups.google.com/group/minecraft-teachers.
To view this discussion on the web visit https://groups.google.com/d/msgid/minecraft-teachers/b0484116-4d98-4634-9724-127f4bfe72a6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

D Thomarie

unread,
Feb 11, 2016, 10:01:28 AM2/11/16
to Minecraft Teachers
will the /remove items work on what is being held and in inventory, or just dropped items?
Thanks

Matt Coia

unread,
Feb 11, 2016, 10:10:10 AM2/11/16
to minecraft...@googlegroups.com
I believe that is only dropped items. See my response in the other thread for how to do inventory clearing. 
--
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 https://groups.google.com/group/minecraft-teachers.
To view this discussion on the web visit https://groups.google.com/d/msgid/minecraft-teachers/c2549ab8-3bbc-465c-80e3-6f31e5bf4e2f%40googlegroups.com.

David Hawkins

unread,
Feb 11, 2016, 9:40:45 PM2/11/16
to Minecraft Teachers
I used lagfix to take care of my items issue. I designed an orienteering map where I wanted to have students go to multiple checkpoints and press a button to get a quest item from a command block. I did not want students sharing these items, so I set two commands at each checkpoint: one to first remove all <itemA> from inventory and one to give a single <itemA>. I then realized students could hit the checkpoint, drop the single item, hit the checkpoint again, and then pick up the item they dropped so they can share this second item with a friend.

So I tried using lagfix to destroy all items students drop immediately. The problem here is that the map is on an easy survival mode where they still have to survive with limited resources and multiple safe houses throughout the map. Animals can be killed for food, but lagfix would destroy the food before it gets picked up...

Therefore I attached a command block to a clock that teleports students back to spawn if they drop any items. At spawn there are a number of command blocks that wipe the inventory of survival items but not quest items. 

I used uNmINeD to make a nicely detailed map outside of the game they will have to use to cross reference with the game to find each checkpoint. I think all the bases are covered for a survival orienteering experience. 

D Thomarie

unread,
Feb 11, 2016, 10:40:28 PM2/11/16
to minecraft...@googlegroups.com
Cool. I love the sound of a survival orienteering map.


--
You received this message because you are subscribed to a topic in the Google Groups "Minecraft Teachers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/minecraft-teachers/4GS9c0hlAZ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to minecraft-teach...@googlegroups.com.

To post to this group, send email to minecraft...@googlegroups.com.
Visit this group at https://groups.google.com/group/minecraft-teachers.

Robijn Vogel

unread,
Feb 18, 2016, 8:12:58 AM2/18/16
to Minecraft Teachers
You may be interested in an idea that I have spent way too little time working on: Use ComputerCraft Command Computers to instead of Command Blocks.
ComputerCraft is the #1 supported mod for McEdu. Using Command Computers, you can combine the best of ComputerCraft ans Command Blocks to do stuff neither of both can do on their own.
A little bit of programming knowledge is required to write in lua, but the knowledge needed it not that complicated. There are lots of tutorials available.

The idea:
When you as a teacher or a command block uses the @p "term" to give something to or teleport the nearest player*, your chat or the command block interface will show this player's name in the output. For instance "Given [Stone] *4 to Robijnvogel". A Command Computer can execute this command as well and retrieve the output as a String array. Using some basic lua String manipulation methods, you can then filter the player name out of this output. After putting this retrieved player name into a database, you can now track the progress of all players using other methods. You can store this database to the file system of your Minecraft server to use this same database over different sessions. You can also make a nifty scoreboard at world-spawn, showing all players and a score next to their name.

The possibilities are almost endless, + players do not need to have specific items in their inventory to indicate their progress.

*You can substitute "player" with "student" in my story.

Robijn Vogel

unread,
Feb 18, 2016, 8:21:31 AM2/18/16
to Minecraft Teachers

David Hawkins

unread,
Feb 19, 2016, 8:08:30 PM2/19/16
to minecraft...@googlegroups.com
Thank you for the information. At this time I can come up with workarounds for all my issues using command blocks and redstone... as time goes on I may head in the direction of lua, but at this time I already have the ball rolling. Perhaps when I have the summer off I will dive into the command computer and replace my command blocks with a command computer infrastructure. The orienteering map has like 70+ command blocks in it. Hopefully 24 students in the server will not make them run differently than when I was testing it. 

--
You received this message because you are subscribed to a topic in the Google Groups "Minecraft Teachers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/minecraft-teachers/4GS9c0hlAZ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to minecraft-teach...@googlegroups.com.
To post to this group, send email to minecraft...@googlegroups.com.
Visit this group at https://groups.google.com/group/minecraft-teachers.

David Hawkins

unread,
Feb 26, 2016, 12:40:17 PM2/26/16
to Minecraft Teachers
It only deletes dropped items.

Rob

unread,
Feb 27, 2016, 3:11:48 AM2/27/16
to Minecraft Teachers
I'm a bit late to this, but finally a question I know! MinecraftEdu has this command-

/educommand removeallitems

It works well :)
Reply all
Reply to author
Forward
0 new messages