# What's an acceptable Diamond/Stone ratio to determine if somebody is cheating?

I manage a minecraft server using hawkeye for grief rollbacks, which has the interesting side effect of knowing exactly how many of each block my players break.

Currently I compare the amount of stone broken less than Y 14 to the amount of diamond broken to get a diamond/stone mining ratio. I have one player with a ratio of 0.0498 and another with 0.006.

Needless to say that's a huge difference, so I would like to know, with typical branch mining, what's a ratio I should expect?

• Let's see some math !
– Zero
May 9, 2012 at 2:17
• Hawkeye only registers block breaking, so fortune wouldn't affect it.
– Ken
May 9, 2012 at 2:20
• An honest player may be getting most of his diamonds while spelunking. Or a cheater can mine a large quantity of stone for a big project. So this measure may not necessarily indicate cheating. May 9, 2012 at 7:21
• @Kurley, I believe he may be looking for users that are using some kind of tool that makes stone transparent or something, so the user can see diamond and other ore through walls. That way, they can dig directly to an ore instead of just randomly digging around. May 9, 2012 at 18:46
• Good for you for using Hawkeye. It's my favorite anti-griefing mod. Unfortunately, it only works if the admin actually gets on. I used to play on a wonderful little server, but it got badly griefed and the admin didn't get on or check the forum thread for weeks :( May 10, 2012 at 15:42

From the Minecraft Wiki:

There is an average of 3.097 diamond ore per chunk.

Assuming that the player mines a chunk (16/16/256 blocks) that is only half filled with blocks (32,768 blocks), there is only an approximately 0.000091552734375% chance that the player will encounter a diamond. However, this is unlikely, as most mining is not directly aligned to the borders of a chunk and some people prefer to mine in branch patterns or through spelunking.

So, assuming that the player is mining a 2x2 tunnel through a chunk with no deviations, the player breaks 64 blocks per chunk, but comes into contact with 192 blocks due to the walls of the tunnel. The probability of encountering a diamond(s) is exponentially lower.

However, there are many other factors:

• the actual location of the diamond(s) within the chunk
• the method the player is using to mine
• what height the player is mining at
• the amount of stone in the chunk that the player is mining in
• the amount of blocks other than stone and diamond that are in the chunk that the player is mining in
• if the player is mining with other people
• if there are any diamonds in the chunk at all (average of 3.097 diamonds per chunk)
• luck
• Enchantments (as mentioned by Zoredache)
• much more not named

tl;dr - there is no reliable ratio.

• as others have said before me, +1 for SCIENCE! May 9, 2012 at 6:03
• It is also possible that he just found a huge cave system and discovered diamonds while exploring it, i.e. barely any mining but still potentially lots of diamonds.
– user1978
May 9, 2012 at 7:31
• The original question did ask to limit below a height of Y:14. It sure seems like someone could refine the quite a bit more and provide an approximate value for what you might get from the most efficient branch mine. But I am also a bit too lazy to take time to do the math myself. May 9, 2012 at 18:51
• @dbemerlin perhaps a better way to catch cheaters is time between diamond finds. Once a player finds diamond, start the clock, end the clock once that player finds diamond again. It would probably be rare for someone x-raying to be satisfied with a single vein of diamond May 9, 2012 at 21:18
• Rarely would anyone be satisfied by a single vein, unless it was need for a specific project. Id agree with Zored...I'm sure averages for branch mining would at least point the OP in the right direction to finding a possible cheater. May 10, 2012 at 3:37

I worked some mysql-fu and figured out my first subselect query that returns a table that's nicely organized with the player name, their diamond count, stone count and ratio of diamond to stone. It still doesn't answer my question of what an appropriate ratio is, but I figure it will be useful to other people.

Note this is stored in a database named "minecraft", hence the schemas. This should work for you if you're using hawkeye with mysql.

``````SELECT diamond.player, diamond.count as dcount, stone.count as scount, (diamond.count / stone.count) as ratio
FROM
(
SELECT minecraft.hawk_players.player as player, count(minecraft.hawkeye.action) as count
FROM minecraft.hawkeye, minecraft.hawk_players
WHERE minecraft.hawkeye.player_id = minecraft.hawk_players.player_id
and minecraft.hawkeye.data = '16'
and minecraft.hawkeye.action = '0'
and minecraft.hawkeye.y < 16
and minecraft.hawkeye.date > '2012-05-01 00:00:00'
and minecraft.hawkeye.date < '2012-06-01 00:00:00'
GROUP BY player
)
AS diamond,
(
SELECT minecraft.hawk_players.player as player, count(minecraft.hawkeye.action) as count
FROM minecraft.hawkeye, minecraft.hawk_players
WHERE minecraft.hawkeye.player_id = minecraft.hawk_players.player_id
and minecraft.hawkeye.data = '1'
and minecraft.hawkeye.action = '0'
and minecraft.hawkeye.y < 16
and minecraft.hawkeye.date > '2012-05-01 00:00:00'
and minecraft.hawkeye.date < '2012-06-01 00:00:00'
GROUP BY player
)
AS stone
WHERE diamond.player = stone.player
ORDER BY ratio DESC
;
``````