Skip to content
KooperlolPublic

About

A client-sided block library for Minecraft

Topics

Resources

Stars

34 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Blockify 2.0

Client-sided (per-player) virtual blocks for Paper, designed as an embeddable library for high-scale private mines.

Requirements

  • Paper 1.21.4+
  • Java 21
  • PacketEvents installed on the server (or shaded by your plugin)

Dependency

<dependency>
  <groupId>codes.kooper</groupId>
  <artifactId>blockify</artifactId>
  <version>2.0.0</version>
</dependency>

PacketEvents and Paper API are provided — your plugin must depend on PacketEvents at runtime.

Usage

public final class PrisonPlugin extends JavaPlugin {
    private Blockify blockify;

    @Override
    public void onEnable() {
        blockify = Blockify.create(this);
        blockify.enable();

        Stage mines = blockify.stages().create(
            "privatemines",
            world,
            new BlockifyPosition(minX, minY, minZ),
            new BlockifyPosition(maxX, maxY, maxZ)
        );

        // Per player:
        Pattern border = new Pattern(Map.of(Material.BEDROCK.createBlockData(), 1.0));
        Pattern ores = new Pattern(Map.of(
            Material.STONE.createBlockData(), 70.0,
            Material.COAL_ORE.createBlockData(), 30.0
        ));
        PlayerMineViews views = mines.createPlayerMine(player, border, ores);
        views.border().setBreakable(false);
        views.mine().setBreakable(true);
        views.fillInitialMine(21); // walls+floor, side air gap open at top, bedrock top from walls to stage edge
        views.show();
    }

    @Override
    public void onDisable() {
        if (blockify != null) {
            blockify.disable();
        }
    }
}

Model

  • Stage — shared world AABB (one region for all private mines)
  • View — per-player layer (border, mine) with its own subscribers
  • Mutations and digs only affect view subscribers, never the whole stage audience

Events

Listen for BlockifyBreakEvent, BlockifyInteractEvent, PlayerEnterStageEvent, PlayerJoinStageEvent, etc. on the host plugin.

Not a standalone plugin

Blockify 2.0 is a library. Do not install the JAR as a server plugin; embed it in your plugin and call Blockify.create(this).

About

A client-sided block library for Minecraft

Topics

Resources

Stars

34 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages