Skip to content

Latest commit

 

History

History
331 lines (249 loc) · 12 KB

README.md

File metadata and controls

331 lines (249 loc) · 12 KB

pack_icon

TNT Coin

Experience the Minecraft TNT Challenge with TNT Coin!

license release downloads

TNT Coin is a Minecraft BE/PE add-on designed to make it easy for players to set up and run the Minecraft TNT Challenge. This challenge, popularized on TikTok live streams, involves players trying to fill a structure with blocks while viewers send virtual gifts that spawn TNT, causing chaos and destruction.

Overview

🌟 Core Features

Save, Load, and Reload Game State

Graphical User Interface (GUI)

  • Simply open your inventory, navigate to the Items tab, and search for "TNT Coin", and right click to open the GUI.

img2

img3

Structure Creation

  • Players can select the base and side block types for the structure.
  • The width and height of the structure can be customized.

TNT Coin Structure Configuration

TNT Coin Structure

Gift Goal

The Gift Goal System in TNT Coin allows you to set specific gift targets for your live stream.

  • Choose from available gifts with emojis, set the desired target count, and toggle the display on or off as needed.
  • To enable live tracking of gift goals, connect your Minecraft world to TikTokLiveMCBE, a WebSocket server. This connection ensures that as viewers send gifts during your TikTok live stream, the progress towards the goal is updated on the action bar.

Gift Goal Settings

Gift Goal Actionbar

Events

  • The game listens for specific script events (e.g., tntcoin:join) received from the WebSocket server.
  • Players can enable or disable specific event actions.

TikTok Events

Event Actions

Players can assign custom actions (e.g., Summon, Fill, Clear Blocks, Play Sound, Screen Title, Screen Subtitle) to specific events, such as receiving a gift or a follow.

Event Actions Button

Event Actions

Countdown

  • When the structure is completely filled, a countdown begins. The countdown determines if the player wins the round.
  • During the countdown, the player’s camera can be configured to rotate around the structure.
  • Players can also configure the starting point of the countdown. Once the countdown ends, the player wins the round.

Timer

  • Players can start, stop, and restart at any time.
  • Players can configure the timer’s duration.
  • If you run out of time, you will LOSE!
  • The timer can be displayed on the action bar.

Timer Actionbar

Summon Entities

  • Summon any entities within the structure.
  • Summon TNT

Settings

Game Settings

Barrier Generation

  • Enable/Disable Barriers in settings.

Barriers

Block Filling

  • Players can specify which block type should be used for filling in settings.
  • Players can start and stop the block filling process at any time.
  • Players can modify the speed of filling process in settings.

Clearing Blocks

Randomized Block Placement

  • This feature allows players to place a random block from a predefined list whenever they use a specific item in the game.
  • Update the RANDOM_BLOCK_ITEM to the desired item ID.
  • Modify the BLOCKS array from scripts/config/config.js file to include any block IDs you want to be randomly selected when the specified RANDOM_BLOCK_ITEM is used.
/**
 * The item that will be used to place random block.
 */
export const RANDOM_BLOCK_ITEM = 'minecraft:amethyst_block';

/**
 * List of possible blocks when placing random blocks.
 */
export const BLOCKS = [
    "minecraft:pink_wool",
    "minecraft:magenta_wool",
    "minecraft:orange_wool",
    "minecraft:lime_wool",
    "minecraft:yellow_wool",
    // ... add more blocks here`
];

Adding Custom Sounds

To add custom sounds, ensure your files are in .ogg format and place them in your resource pack in your desired directory (e.g., sounds/meme/). Then, define them in the sounds/sound_definitions.json file.

Below is an example of how to structure your custom sounds:

{

  "vine_boom": {
      "category": "meme",
      "sounds": ["sounds/meme/vine_boom"]
  },

  "your_custom_sound": {
      "sounds": ["path/to/your/sound"]
  }

}

Adding Images or Gifts

To add new images or gifts to your screen, place your image files (e.g., gift-new.png, 360px x 360px) in the textures/tnt-coin/gifts/ folder.

After adding your images, reference them in the gifts.json file located in the ui/ folder. This file controls how the images are displayed on the screen.

Each gift occupies 10% of the total width, allowing a maximum of 10 gifts to be displayed horizontally at once.

{
  "namespace": "gifts",

  "stack_panel": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": ["100%", "100%"],
    "controls": [

      {
        "gift_1@gifts.template": {
          "texture": "textures/tnt-coin/gifts/gift-rose.png"
        }
      },

      {
        "MY_GIFT@gifts.template": {
          "texture": "textures/tnt-coin/gifts/MY-GIFT.png"
        }
      }

    ]
  },

  "template": {
    "type": "image",
    "size": ["10%", "100%"],
    "layer": 1,
    "texture": ""
  }
}

TikTok Gifts Emoji

TikTok Gifts

Below are some of the TikTok gifts that have emoji. Each gift comes with its own emoji and coin value.

Gift Name Emoji Coins
Gimme The Vote 1
Community Fest 1
Music Play 1
GG 1
Ice Cream Cone 1
Rose 1
TikTok 1
Thumbs Up 1
Heart 1
Cake Slice 1
Love you 1
Football 1
Rainbow 1
Flame heart 1
Birthday Cake 1
Heart Puff 1
Heart Me 1
Team Bracelet 2
Finger Heart 5
Potato 5
Smart 5
Ladybug 5
Tofu 5
Applause 9
Cheer You Up 9
Friendship Necklace 10
Rosa 10
Tiny Diny 10
ASMR Time 10
Horseshoe 10
Cherry Blossom Bunny 10
Perfume 20
Doughnut 30
Sign language love 49
Butterfly 88
Family 90
Sending strength 90
Fist bump 90
Paper Crane 99
Little Crown 99
Cap 99
Hat and Mustache 99
Honorable Person 99
Breakthrough Star 99
Kiss your Heart 99
Hot Shot 99
Guitar 99
Like-Pop 99
Birthday Crown 99
Self care mask 99
Community Crown 99
Star 99
Confetti 100
Hand Hearts 100
Hand Heart 100
Bear love 100
Marvelous Confetti 100
Socks and Sandals 150
Sunglasses 199
Hearts 199
Lock and Key 199
Garland Headpiece 199
Love You 199
Cheer For You 199
Jungle Hat 199
Goalkeeper Save 199
Sending positivity 199
Meerkat 199
Birthday Glasses 199
Stinging Bee 199
Massage for You 199
Pinch Face 249
Boxing Gloves 299
Duck 299
Corgi 299
Dash 299
Superpower 299
Elephant trunk 299
TikTok Crown 299
Fruit Friends 299
Play for you 299

Download

Important

Requirement: Enable "Beta APIs" in your world settings for this add-on to function correctly.

Version: This add-on is designed for Minecraft BE/PE version 1.21.22+. Ensure your game is updated to this version or later for the best experience.

Show your support by giving it a ⭐!

Note: After importing the TNT Coin Resource Pack and Behavior Pack into Minecraft, move them from the resource_packs and behavior_packs folders to the development_resource_packs and development_behavior_packs folders inside the com.mojang directory. This step ensures that any changes or modifications you make to the TNT Coin packs are applied globally.

Bridging your TikTok Live and Minecraft with TikTokLiveMCBE

If you want to connect your TikTok live stream to Minecraft and trigger in-game actions like automatically dropping TNT when someone sends a gift you'll need to set up a WebSocket server.

See here: TikTokLiveMCBE

Contributing

Feel free to contribute by submitting issues or pull requests. Any improvements or new features are welcome!

License

This project is licensed under the terms of the MIT License.