Skip to content

Gen Block genblock

This feature provides gen blocks (And infinite water/lava buckets) for players to use.

Config

First, a list of general options will be given. Then, a guide to creating your own gen block variations.

cost-to-buy-genblock

The cost of buying a single gen block from the /gen shop.

horizontal-distance

How far, by default, horizontal gen blocks go in blocks.

bucketBased

If the gen blocks will be based on buckets, rather than blocks. Effectively, this eliminates people using printer to place gen blocks.

persist-genblock

If gen blocks that are in progress will continue through feature reloads and server reboots.

speed

The speed, in ticks, that a gen block will generate. Ex. A setting of 2 will generate every 2 ticks or 10 times a second.

deny-use-in-combat

Prevents players from using any gen block while in combat.

should-do-source-block

If a 'source block' should be placed at the origin of the gen block. If the original placer of the gen block punches the origin, the gen block will stop.

reverse-on-cancel

If set to true, any cancelled gen block will reverse and delete the generated blocks.

source-block-is-wool

If the source block should be set to a wool block instead of the type being generated.

only-allow-in-own-territory

If gen blocks should only be allowed in your own territory.

allow-in-allied-territory

If gen blocks should be allowed in ally territory. Useful when using the raiding-outpost feature.

ignored-block-types

These types will be ignored when gen blocks are generating. Effectively, gen blocks will replace these types instead of stopping.


enemy-check Section

This section contains some values for how the plugin should check for nearby enemies of the player.

enemy-check.enabled

If the enemy check is enabled.

radius

The distance from the gen block enemies must be to be recognized as 'too close'.

radius-vertical

The distance from the gen block VERTICALLY enemies must be to be recognized as 'too close'.

just-cancel-at-start

If this is set to true, this will make it so genblocks can only be canceled when they're placed.

disable-if-below-or-at-relation

The relation determined to be an 'enemy' of the player.

check-every-nth-generation

How often to check for enemies nearby. Setting to a lower value will yield more accurate results but cause more lag.

Gen Block Configuration

To create a gen-block, first lets look at an example:

obsidian-vertical:
  price-per-use: 1500
  is-pseudo: false
  direction: VERTICAL:DOWN
  type: OBSIDIAN
  is-glowing: true
  distance: 256
  trigger-physics: true
  max-world-height: 256
  name: '&bObsidian &7Gen Block'
  lore:
    - '&7Price: &c1500'
    - '&7Direction: &cVertical | Down'

price-per-use

The price-per-use flag sets the amount it will charge the user for each use of the gen block. Each gen block is re-usable, so a cost must be applied to the player.

is-pseudo

This flag sets if the gen block will move through its own block type.

direction

This is the direction the gen block will work in. There are a few directions you can use.

  • VERTICAL:DOWN
  • VERTICAL:UP
  • HORIZONTAL
  • SMART - Uses VERTICAL:DOWN by default, if the player uses /genblock toggledirection switches to VERTICAL:UP.
  • MAGIC - This is used for infinite water/lava buckets.
  • SINGLE - This will make a genblock that just spawns a single block and then stops.

Note

Using VERTICAL:DOWN with falling block types will place glass underneath the blocks while generating to prevent falling.

To use the MAGIC direction, simply set the type to WATER_BUCKET or LAVA_BUCKET.

type

The type the gen block generates.

distance Optional

Overrides the distance for the genblock and sets it to only use this many generations.

The remaining options are used for displaying the gen block in the /gen shop.

trigger-physics Optional

Set this to true when you want blocks like liquids to have their physics triggered while generating. This will cause them to flow.

max-world-height Optional

If this is set, it will override the world's maximum height for the gen block.

Command

  • /genblock toggledirection - Toggles the direction of your SMART gen blocks.
  • /genblock give (player) (type) - Gives a gen block to a player.

Permissions

  • Base Level - Some commands & base usage.
  • Admin Level - Some commands, not charged for use, bypass enemy check, etc.