跳到正文

EventBlocks API

API for modpacks, which allows you to add custom blocks, which will generate random event from added list every noon

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

EventBlock API

Description:
EventBlock API is a Minecraft Forge mod for 1.20.1 that adds special blocks that generate random events every in-game noon. These blocks can add excitement and unpredictability to your world, making them perfect for adventure maps, custom worlds, or modpacks.

Features:

  • Blocks that trigger a random event every in-game noon.
  • When block is placed – it will take texture, sounds, model and other properties of block beneath it (for now only works with: stone, dirt, diorite, snow block, granite, andesite, grass block and sand)
  • Fully configurable: modpack creators can add custom events.
  • Works seamlessly with other Forge mods.

For Modpack Creators:
To add a custom event to a block’s event list:

  1. Import the RandomBlock class:

    import com.creatorsindrome.eventblock.common.block.RandomBlock;

  2. Register your event using the static method:

 
    RandomBlock.regBlockEvent(new BlockEvent() {
@Override
public void run(BlockState blockstate, ServerLevel world, BlockPos pos) {
// Your custom event code here
}
});

 

The run method receives the following arguments:

  • BlockState blockstate — the state of the block triggering the event
  • ServerLevel world — the server-side world
  • BlockPos pos — the position of the block

Usage:
Simply place the Random Event Block in your world. Every in-game noon, it will execute one of the registered events. Combine multiple blocks for more complex behaviors.

Recommended For:

  • Adventure maps
  • Custom servers
  • Modpacks looking to add dynamic world events

常见问题

EventBlocks API 支持哪些 Minecraft 版本?

EventBlocks API 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

EventBlocks API 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

CreatorSindrome 的其他作品

查看全部 →