Skip to content

ClexaGod/Tree-Capitator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TreeCapitator Logo

TreeCapitator

Advanced Tree Felling for PowerNukkitX

License Platform Language Version


The Ultimate Tree Felling Plugin for PowerNukkitX
Smart Algorithms • Structure Protection • Modern Support • Lag-Free

DownloadFeaturesConfiguration


🎥 Showcase

Seamless integration with PowerNukkitX physics.
(Video not playing? Click to watch)


🌲 Overview

TreeCapitator is a next-generation plugin built specifically for the PowerNukkitX ecosystem. It enhances the survival experience by allowing players to chop down entire trees instantly by breaking the bottom log.

Unlike traditional plugins, TreeCapitator leverages the full power of PowerNukkitX API to provide a bug-free, performant, and safe experience. It intelligently distinguishes between natural trees and player-built structures, ensuring your builds are safe.

✨ Key Features

🛡️ Advanced Structure Protection

Don't let your players ruin their homes! Our intelligent Tree Validator algorithm analyzes the structure before breaking it.

  • Soil Check: Verifies valid soil (Grass, Dirt, Nylium, etc.).
  • Leaf Check: Scans for a minimum amount of leaves around the logs.
  • Top Leaf Check: Ensures the tree has a canopy.

🍃 Smart Leaf Removal

Forget about floating leaves! Our Smart Leaf Manager uses a distance-based algorithm.

  • No Cross-Cutting: Adjacent trees in dense forests remain untouched.
  • Type Matching: Oak leaves are only removed if an Oak log is broken.

⚡ Iterative BFS Algorithm

We use a Queue-based Breadth-First Search (BFS) algorithm instead of recursion.

  • Zero Crashes: Even the largest Jungle trees won't cause a StackOverflowError.
  • Lag-Free: Optimized for PowerNukkitX's threading model.

⚔️ Fair & Balanced Gameplay

  • Durability Sync: Tools lose durability for every log broken, respecting the Unbreaking enchantment.
  • Tool Control: Configure exactly which axes (or items) can trigger the effect.

🛠️ Installation

  1. Download the latest .jar file from the Releases Page.
  2. Drop the file into your PowerNukkitX server's plugins folder.
  3. Restart the server.
  4. Enjoy!

⚙️ Configuration (config.yml)

Everything is customizable to fit your server's needs.

# TreeCapitator Configuration

# Enable/Disable the plugin globally.
enabled: true

# Should the plugin only work when sneaking (shift)?
sneak-required: false

# Maximum number of blocks to break at once (Protects against lag spikes)
max-blocks: 500

# Allowed tools to trigger the effect
allowed-tools:
  - "minecraft:wooden_axe"
  - "minecraft:stone_axe"
  - "minecraft:iron_axe"
  - "minecraft:diamond_axe"
  - "minecraft:netherite_axe"

# Which blocks are considered "Tree Logs"? (Supports 1.21+ blocks like Pale Oak)
log-blocks:
  - "minecraft:oak_log"
  - "minecraft:cherry_log"
  - "minecraft:pale_oak_log"
  # ... and more

# Automatically break connected leaves?
break-leaves: true

# --- Structure Protection Settings ---

# Minimum number of leaves required to consider it a tree.
min-leaves: 5

# Valid blocks that must be under the tree.
allowed-soil:
  - "minecraft:dirt"
  - "minecraft:grass_block"
  # ...

🤝 Contributing to the Community

We believe in the power of open source and the PowerNukkitX Community. If you have suggestions, found a bug, or want to improve the code, please open an issue or submit a Pull Request.

📜 License

This project is proudly licensed under the Apache License 2.0.


Made with ❤️ by ClexaGod for the PowerNukkitX Community

Packages

No packages published

Languages