CTKor NoPlace

This mod provides a config to restrict blocks from being placed in dimensions.

This mod provides a config to restrict blocks from being placed in dimensions.

Dependencies

This mod requires CTKor Library. Please make sure it is installed along with this mod.

Overview

Let's say you have a portal block that you want the player to have to place in the Nether. Simply add the block to the config file and whitelist dimension -1 and you're good to go.

Configuration

A simple example configuration is provided:

{
  "blocks": {
    "minecraft:stone:0": {
      "dimensionIdWhiteList": [],
      "dimensionIdBlackList": [
        0
      ],
      "returnedItem": "minecraft:stone:0",
      "message": "As an example, stone has been blacklisted for dimension 0 (Overworld)."
    }
  }
}

The .json is pretty straightforward, but there are a couple of things to note here.

Whitelist and Blacklist Logic

The whitelist and blacklist logic works as follows:

  1. If the whitelist is NOT empty and the placed block is in the whitelist for the dimension, it gets placed.
  2. If the blacklist is NOT empty and the placed block is NOT in the blacklist for the dimension, it gets placed.

Therefore, if you were to whitelist and blacklist the same dimension, the block would still be placed because the whitelist is checked first.

Returned Item

If the returned item is left blank or omitted entirely, the mod will return to the player the item that is normally given when the block is broken. This works for most blocks, however, it does not work for blocks that return something different. Stone is a good example of this. When the stone block is broken, cobblestone is returned. The returnedItem parameter allows you to override the returned item, like we did in the example above.

Message

If the message parameter is provided, and not left blank, the player will see this message when they try to place a restricted block. This serves to notify and inform the player, optionally giving hints as to where the block can be placed. Without this information the player might think that something is bugged or glitched.

 

You can use this mod in any modpack provided you do not host the file elsewhere.

The CTKor NoPlace Team

profile avatar
  • 75
    Followers
  • 27
    Projects
  • 29.2M
    Downloads

More from codetaylorView all

  • Pyrotech project image

    Pyrotech

    • 1.3M
    • Mods

    An early game mod with new primitive devices, combustion machines, smelting mechanics, storage options, tools, torches, advancements, and absolutely zero GUIs -- with exception to the substantially complete, mostly illustrated, and charred guidebook.

    • 1.3M
    • March 1, 2025
    • Mods
    • +3
  • Dropt project image

    Dropt

    • 4.4M
    • Mods

    Modify block drops based on player, gamestage, dimension, biome, held item, y-level, items dropped, fortune level, silktouch. Rules can be defined using ZenScript, JSON, or the DroptAPI.

    • 4.4M
    • June 7, 2024
    • Mods
    • +4
  • Artisan Worktables 1.16 project image

    Artisan Worktables 1.16

    • 162.6K
    • Mods

    Themed worktables with tool slots.

    • 162.6K
    • July 10, 2023
    • Mods
    • +2
  • Athenaeum project image

    Athenaeum

    • 7.1M
    • Mods

    This is my Minecraft mod library. There are many like it, but this one is mine.

    • 7.1M
    • July 9, 2023
    • Mods
  • Pyrotech project image

    Pyrotech

    • 1.3M
    • Mods

    An early game mod with new primitive devices, combustion machines, smelting mechanics, storage options, tools, torches, advancements, and absolutely zero GUIs -- with exception to the substantially complete, mostly illustrated, and charred guidebook.

    • 1.3M
    • March 1, 2025
    • Mods
    • +3
  • Dropt project image

    Dropt

    • 4.4M
    • Mods

    Modify block drops based on player, gamestage, dimension, biome, held item, y-level, items dropped, fortune level, silktouch. Rules can be defined using ZenScript, JSON, or the DroptAPI.

    • 4.4M
    • June 7, 2024
    • Mods
    • +4
  • Artisan Worktables 1.16 project image

    Artisan Worktables 1.16

    • 162.6K
    • Mods

    Themed worktables with tool slots.

    • 162.6K
    • July 10, 2023
    • Mods
    • +2
  • Athenaeum project image

    Athenaeum

    • 7.1M
    • Mods

    This is my Minecraft mod library. There are many like it, but this one is mine.

    • 7.1M
    • July 9, 2023
    • Mods