Skip to content
Aithor Dev

Apartment Core

On this page

ApartmentCore Tax Routing

When an ApartmentCore apartment's region sits inside a nation's claimed territory, the tax its owner pays can be forwarded into that nation's treasury.

This works exactly like FactoryCore tax routing, but is configured completely independently β€” you can enable one without the other, and give them different shares and caps.

The two-key switch

YAML
# NationCore β€” config.yml
integration:
  apartment-tax:
    enabled: true
YAML
# ApartmentCore β€” its own config
integration:
  nation-tax:
    enabled: true

Both sides must be on.

Settings (NationCore side)

YAML
integration:
  apartment-tax:
    enabled: true
    share-percent: 100.0
    max-per-payment: 0.0
    log: true
Key Default Meaning
enabled true Master switch for accepting routed apartment taxes
share-percent 100.0 Percentage banked into the owning nation's treasury (0–100, clamped)
max-per-payment 0.0 Maximum a single payment may add. 0 disables the cap
log true Log every routed payment to the console

How a payment is processed

The same gate chain as factory tax:

  1. The integration is enabled.
  2. The amount is positive, finite and not NaN.
  3. The location is valid and its world is loaded.
  4. The land belongs to a nation.

Then:

Text
amount = gross Γ— (share-percent / 100)
amount = min(amount, max-per-payment)   # when capped
amount = floor(amount Γ— 100) / 100

Deposited as TAX_INCOME with the description Apartment tax (<label>). The method returns the banked amount and never throws.

Independence from factory tax

The two blocks share no state:

Factory Apartment
Enable switch integration.factory-tax.enabled integration.apartment-tax.enabled
Share integration.factory-tax.share-percent integration.apartment-tax.share-percent
Cap integration.factory-tax.max-per-payment integration.apartment-tax.max-per-payment
Logging integration.factory-tax.log integration.apartment-tax.log

Land permits

ApartmentCore also participates in the land-use permit system, asking NationCore before it registers a new apartment region on claimed ground.

Search documentation

    Type to start searching.