OpenGL drivers are usually part of the graphic driver package (though there's also a default implementation on the Windows installation media); in your case, NVidia's. They have to be to access the hardware on a low level and to know which extensions and capabilities are implemented by the hardware.
So the basic answer is: Update the drivers for your graphic card. That's the most recent version of OpenGL you're going to get. That's also the most bug-free, usually, and thus recommended.
A /testforblock
will actually work perfectly here. /testforblock
allows for partial NBT matches. This means that you can simply not specify a slot, and it will work. There are a couple of problems (if someone puts too many materials in a stack it won't detect properly, for example), but overall, it's not that difficult to do.
Let's go with the example you pose, 20 planks and 35 stone bricks. We can check to see if there is a chest with 20 planks and 35 stone bricks inside as follows:
/testforblock X Y Z minecraft:chest M {Items:[{id:minecraft:planks,Count:20b,Damage:0s},{id:minecraft:stonebrick,Count:35b,Damage:0s}]}
Where X
, Y
, and Z
are the coordinates (or relative coordinates) of the chest you want to check. The value of M
depends on the direction your chest is facing. You can test this by trying 0 first, and then looking in the command block error output, below the command input. If you got it wrong, it will say something to this effect:
[18:26:20] The block at -1320,57,-662 had the data value of 3 (expected: 0).
and you can adjust accordingly. The value of Damage
in each of the item compound tags will vary depending on the particular variety of block you want to check for, or, it can be omitted if it does not matter.
For some reason, you do need to include the letters after the numbers in the NBT tag, which indicate what type of number it is (Count is a byte, Damage is a short). I'm not sure why this is exactly, to be perfectly honest.
If you want to check for more than 64 of an item, you can do that, you'll just need to check for a stack of 64 and the remainder as separate item entries. In other words, checking for exactly 74 cobblestone would be done as follows:
/testforblock X Y Z minecraft:chest M {Items:[{id:minecraft:cobblestone,Count:64b},{id:minecraft:cobblestone,Count:10b}]}
Best Answer
I'm afraid the only reliable way would be to test for every single player slot of the dead player individually and depending on whether the item was found or not, you'd clear that slot (with the
keepInventory
gamerule set to true, obviously).example commands (
death
is a stat.deaths objective):this solution is kinda-multiplayer proof, making sure only one player will get checked at a time to prevent false positives. might lead to problems if there are too many players online/dead at once and respawn quickly
this obviously only works with one item-name at a time, so having to test for multiple items in every slot will become very tedious. You could tag every item you don't want to be removed though, to make your life easier:
and then the testfor would look like this