Skip to content

CraftEngine-Community/craft-engine-blocks

Repository files navigation

CraftEngine Extensions

English version

Translated by AI for reference purposes only.

Extended Block Behaviors

  • Adjustable Redstone Block
  • Pickaxe Block
  • Placer Block
  • Chair Block (Block Entity)

Extended Item Behaviors

  • Place Block

Extended Event Functions

  • Apply Item Data Function
  • Set Item Tooltip Description/Lore Function

Extended Item Settings

-[X] Dynamic Attributes

Extended Item Data

  • Fixed Random Value (Used for randomizing dynamic attribute values)
  • Get Parameter (Only used for Client-Bound Data to retrieve fixed random value parameters from the item)
  • Enchantment Lore (Suitable for customizing enchantment display effects via Client-Bound Data)

References

I adapted some code from the following open-source projects:

Example Configurations

Pickaxe Block & Placer Block

block_extension_demo.zip

Enchantment Lore

items:
  default:topaz_pickaxe:
    material: golden_pickaxe
    client-bound-data:
      hide-tooltip:
        - enchantments
      gtemc:enchantments_lore:
        efficiency: |-
          <!i><gray><lang:enchantment.%id_namespace%.%id_value%> <lang:enchantment.level.%level%>
            Increases mining speed by <green><expr:0.##:'20 + 5 * %level%'>%</green>

拓展方块行为

  • 可调节红石块
  • 镐方块
  • 放置方块
  • 座椅方块 (方块实体)

拓展物品行为

  • 放置方块

拓展事件函数

  • 应用物品数据函数
  • 设置物品提示框中的描述信息函数

拓展物品设置

  • 动态属性

拓展物品数据

  • 固定随机值 (用于动态属性数值随机化)
  • 获取参数 (仅用于客户端侧物品数据从物品获取固定随机值参数)
  • 附魔描述 (适用于通过客户端侧物品数据自定义附魔显示的效果)

参考项目

我从以下开源项目借鉴了一些代码

示例配置

镐方块 & 放置方块

block_extension_demo.zip

附魔描述

items:
  default:topaz_pickaxe:
    material: golden_pickaxe
    client-bound-data:
      hide-tooltip:
        - enchantments
      gtemc:enchantments_lore:
        efficiency: |-
          <!i><gray><lang:enchantment.%id_namespace%.%id_value%> <lang:enchantment.level.%level%>
            增加 <green><expr:0.##:'20 + 5 * %level%'>%</green> 挖掘速度

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages