Skip to content

merging 1.21 changes#13

Merged
funkemunky merged 4 commits intomainfrom
feature/1.21.11
Feb 20, 2026
Merged

merging 1.21 changes#13
funkemunky merged 4 commits intomainfrom
feature/1.21.11

Conversation

@funkemunky
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 16:00
@funkemunky funkemunky merged commit e14b234 into main Feb 20, 2026
1 check failed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges changes from version 1.21 into the main branch, primarily updating the codebase to use PacketEvents 2.11.1 and introducing significant refactoring to entity/world tracking, vector types, and potion effect handling.

Changes:

  • Updated PacketEvents from 2.9.4 to 2.11.1
  • Refactored vector types from Bukkit's Vector to PacketEvents' Vector3d and Vector3i
  • Restructured world and entity tracking with new World class and EntityTrackHandler

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pom.xml Added maven-central repository and updated PacketEvents version
Compat/src/main/java/dev/brighten/ac/utils/MathUtils.java Changed return types from Bukkit Vector to Vector3d
Compat/src/main/java/dev/brighten/ac/utils/KLocation.java Replaced Vector with Vector3d, added Vector3i support
Anticheat/src/main/java/dev/brighten/ac/handler/block/BlockUpdateHandler.java Major refactoring to delegate world tracking to new World class
Anticheat/src/main/java/dev/brighten/ac/handler/block/World.java New class for managing world chunks and tracked entities
Anticheat/src/main/java/dev/brighten/ac/handler/PotionHandler.java Replaced Bukkit potion types with PacketEvents types, added thread safety
Anticheat/src/main/java/dev/brighten/ac/data/APlayer.java Renamed handlers, removed dimension type accessor, added collision caching
Anticheat/src/main/java/dev/brighten/ac/handler/PacketHandler.java Added player input handling, updated entity tracking references
Anticheat/src/main/java/dev/brighten/ac/utils/world/BlockData.java Inlined hopper/cauldron collision logic, added new block types
Comments suppressed due to low confidence (2)

Anticheat/src/main/java/dev/brighten/ac/handler/MovementHandler.java:358

  • Redundant .clone() call. The location is cloned, modified, then cloned again before converting to Vector3i.
            player.getInfo().setBlockBelow(Optional.of(player.getWorldTracker()
                    .getBlock(to.getLoc().clone().subtract(0, 1, 0).clone().toVector3i())));

Anticheat/src/main/java/dev/brighten/ac/handler/block/BlockUpdateHandler.java:84

  • Misplaced TODO comment. This TODO appears to be about the Materials class but is placed in the middle of lily pad placement logic.
            //TODO Refactor this system to use just packetevents instead of this class

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

, packet.getEffectDurationTicks(),
packet.isAmbient(), packet.isVisible(), packet.isShowIcon(), null)));
} finally {
lock.readLock().unlock();
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect lock type being released. Should be lock.writeLock().unlock() since a write lock was acquired at line 70.

Suggested change
lock.readLock().unlock();
lock.writeLock().unlock();

Copilot uses AI. Check for mistakes.
Anticheat.INSTANCE.getLogger().log(Level.SEVERE, "Check ID unregister failed", e);
}
commandManager.getScheduler().cancelLocaleTask();

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed call to commandManager.getScheduler().cancelLocaleTask() without explanation. This could cause resource leaks if the locale task is not properly cancelled on plugin disable.

Suggested change
// Ensure any scheduled locale task is cancelled on plugin disable
commandManager.getScheduler().cancelLocaleTask();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants