Extra Hard Mode

Extra Hard Mode

63.1k Downloads

improving anti grinder

erik1988 opened this issue ยท 2 comments

commented

Hi,
Do you think there is room for improvement on the antigrinder based on what this guy said?
Thanks!
ezeiger92/QuestWorld2#18 (comment)

commented

Any anti-whatever stuff can always be improved. But it also must be tested to prevent false positives and the like (and sometimes mobs do happen to fall in water in the wilderness, so yea).

Heck, even the MobHunting plugin has a bunch of antigrinder stuff, which sometimes I've seen being triggered in caves and other areas with lots of mobs. Same with antiafk stuff.


Now to my opinion - first of all I'm okay with accepting any improvements and specific things/requests, etc.

But as it stands - in a game where you can basically alter the entire world you're in, and due to the system of spawning MC uses, I don't think we're going to have even that near-perfect system. The same could potentially be said for anticheat stuff as well (since all movement is practically all client-side - no keystrokes are sent, etc.)

Anyways, that's the short version of a discussion one could have (and it also depends on what you're aiming for, e.g. the mob spawning and the like - you could have mobs only spawn outside of player-built stuff, etc.) so yea...

commented

The only code bugs from my post are the adjacent blocks loop issue and the skeleton/wither skeleton mix up.

Adjacent blocks (AntiGrinder.java, ~line 200):

//// Fills in 0
adjacentBlocks[0] = block;
for (int i = 0; i < adjacentFaces.length; i++)
{
    //// Fills in 1, 2, 3, 4
    adjacentBlocks[i + 1] = block.getRelative(adjacentFaces[i]);
}
for (int i = 0; i < adjacentFaces.length; i++)
{
    //// Fills in 4 (again!), 5, 6, 7
    adjacentBlocks[i + adjacentFaces.length] = underBlock.getRelative(adjacentFaces[i]);
    //// Should be adjacentBlocks[i + 1 + adjacentFaces.length], which would fill 5, 6, 7, 8
}

Skeleton/Wither skeleton (AntiGrinder.java, ~line 180)

case SKELETON: //// WITHER_SKELETON is likely what you want here
case ENDERMAN:
{
    // tall monsters can get stuck when they spawn like WitherSkeletons
    if (entity.getEyeLocation().getBlock().getType() != Material.AIR)
        return clearDrops(event);
    break;
}

The rest are general issues due to the way things are being checked, and I have no solutions for them.