跳到正文

CompactResourcesPack

作者:TetraTheta

Resource Pack required by CompactResources Paper plugin for displaying 'Compressed Block' as proper block.

收藏

截图

介绍

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

CompactResources Pack

CompactResources Pack provides item models for Heart of the Sea based custom items created by the CompactResources Paper plugin.

This pack is the companion resource pack for CompactResources and is developed primarily for that plugin. The plugin handles recipes, item metadata, stack-size behavior, and optional server-side pack delivery; this pack supplies the client-side models and textures those items need.

The pack does not add blocks, items, recipes, or gameplay logic by itself.

It only changes how specific minecraft:heart_of_the_sea item stacks are rendered when they carry the expected Custom Model Data string.

Related projects:

  • CompactResources plugin:

Item Model Contract

The resource pack overrides:

assets/minecraft/items/heart_of_the_sea.json

That item definition reads the minecraft:custom_model_data component and selects a model when its strings list contains a value in this format:

compactresources:<material>/<level>

Example:

compactresources:cobblestone/x9
compactresources:cobblestone/x81
compactresources:cobblestone/x729

Only the Custom Model Data string is required for this resource pack to display the custom model.

The plugin also writes Persistent Data Container values so it can identify the item on the server.

Plugin Item Structure

CompactResources creates compressed blocks as minecraft:heart_of_the_sea items with three important pieces of metadata:

  • minecraft:custom_model_data.strings: selects the model in this resource pack.
  • Bukkit Persistent Data Container: identifies the compressed material and level.
  • minecraft:item_name: displays a translated block name followed by the level.

In vanilla item component syntax, a plugin-recognizable Cobblestone x9 item is equivalent to this shape:

heart_of_the_sea[
  custom_model_data={strings:["compactresources:cobblestone/x9"]},
  custom_data={PublicBukkitValues:{compactresources:compressed_material:"cobblestone",compactresources:compression_level:"x9"}},
  item_name=[{"translate":"block.minecraft.cobblestone"}," x9"]
]

For display-only use with a datapack, command, or loot table, the minecraft:custom_model_data component is the key part.

For interoperability with the CompactResources plugin, keep the PublicBukkitValues payload as well.

Example /give Command

/give @s heart_of_the_sea[custom_model_data={strings:["compactresources:cobblestone/x9"]},custom_data={PublicBukkitValues:{compactresources:compressed_material:"cobblestone",compactresources:compression_level:"x9"}},item_name=[{"translate":"block.minecraft.cobblestone"}," x9"]] 1

If you only want to test the model visually and do not need the plugin to treat the item as a compressed block, this shorter form is enough:

/give @s heart_of_the_sea[custom_model_data={strings:["compactresources:cobblestone/x9"]}] 1

Supported Materials

The <material> segment must be one of these IDs:

cobblestone
stone
cobbled_deepslate
deepslate
dirt
sand
gravel
clay
coal_block
raw_copper_block
raw_iron_block
raw_gold_block
copper_block
iron_block
gold_block
netherite_block

The <level> segment must be one of:

x9
x81
x729

Model and Texture Files

Each model is stored at:

assets/compactresources/models/item/compressed/<material>_<level>.json

Each texture is stored at:

assets/compactresources/textures/item/compressed/<material>_<level>.png

For example:

assets/compactresources/models/item/compressed/cobblestone_x9.json
assets/compactresources/textures/item/compressed/cobblestone_x9.png

You can replace the PNG files while keeping the same paths and file names.

The item definition and model files are already wired to those locations.

Server Resource Pack Delivery via CompactResources plugin

When used with the CompactResources plugin, use the download link of this pack in config.yml:

resource-pack:
  enabled: true
  force: true
  url: 'https://cdn.modrinth.com/data/.../versions/.../compact-resources-pack.zip'
  sha1: '<zip sha1>'
  uuid: '9d54b89a-1738-4307-abd8-3f7f9d8613f5'

常见问题

CompactResourcesPack 支持哪些 Minecraft 版本?

CompactResourcesPack 支持 Minecraft Java 版 26.1.2–26.3,共 3 个版本。下载时注意选择和你游戏版本一致的文件。

CompactResourcesPack 怎么安装?

把下载的 .zip 文件(不用解压)放进游戏目录的 resourcepacks 文件夹,进游戏后在「选项 → 资源包」里把它移到右边启用。

评论

登录后评论和评分

TetraTheta 的其他作品

查看全部 →