概览
基于数据驱动的方块与物品揭示系统。探索即发现!
Revelationary 提供了一种通过数据包(或供其他模组使用的 API)来限制世界中新方块发现的方式。使用 Revelationary,你可以设计整合包/模组的进度流程,让玩家在开始新的游戏时不会感到信息过载。只有当玩家解锁了特定的进度后,他们才能感知到这些世界生成的方块,从而使其可见。
示例: 玩家最初将某种特定矿石视为石头。当他们击败末影龙后,便可以在世界中看到并挖掘该矿石——它从一开始就存在于那里。此机制针对每个玩家独立生效,且性能极佳。
揭示(Revelations)
“[a] revelation is the revealing or disclosing of some form of truth or knowledge”(揭示是指以某种形式展现或披露真理或知识的过程)
如果你正在设计基于进度系统的模组或整合包,那么你来对地方了。
借助 Revelationary,你可以使用数据包或 Revelation API,随着玩家的进度逐步揭示世界中的方块。例如,当玩家击败 Boss 或达到重要里程碑时,一个原本平平无奇的、充满普通石头的洞穴可能会被揭示为生机勃勃、蕴藏丰富矿石的景象。
只要玩家尚未达成必要的进度,你通过 API 或数据包向 Revelationary 注册的方块和物品将仅显示为晦涩难懂的名字;对于世界中的方块而言,它们掉落的内容将与伪装成它的那个方块相同。这能为玩家提供无缝的体验,避免他们在游戏初期被大量无法使用的未知资源淹没。相反,你可以在恰当时机引入所需资源。
局限性
除了视觉效果和掉落物外,伪装的方块保留了原方块的所有属性:碰撞箱、光线穿透性等所有特性。在为伪装寻找合适候选对象时请牢记这一点。对于你的矿石而言,石头或深板岩是完美的伪装选择,因为它们具有许多相似之处。同样,你也可以用罂粟来伪装你那难以捉摸的植物:两者都具有较小的碰撞箱,玩家可以穿过它们。
如果你是程序员,可以使用 Revelation API 根据方块对玩家是否可见来动态更改其属性。这样,你甚至可以将你的花朵伪装成空气:在伪装状态下赋予它一个空的碰撞箱,你的玩家可能直到能看见它们时才会意识到它的存在!
在 Revelationary 的 wiki 中查找大量关于数据包和 API 的示例:
通过数据包注册揭示(Revelations)
必须放置在 resources/data/<<mod_id>>/revelations 文件夹中
{
"advancement": "spectrum:milestones/reveal_quitoxic_reeds",
"block_states": {
"minecraft:grass": "minecraft:beacon",
"minecraft:tall_grass": "minecraft:obsidian",
"minecraft:tall_grass[half=upper]": "minecraft:netherite_block"
},
"items": {
"minecraft:nether_star": "minecraft:gunpowder"
}
}
注册“揭示感知”的方块或物品
public class CloakedItem extends Item implements RevelationAware {
Identifier cloakAdvancementIdentifier;
Item cloakItem;
public CloakedItem(Settings settings, Identifier cloakAdvancementIdentifier, Item cloakItem) {
super(settings);
this.cloakAdvancementIdentifier = cloakAdvancementIdentifier;
this.cloakItem = cloakItem;
registerCloak();
}
@Override
public Identifier getCloakAdvancementIdentifier() {
return cloakAdvancementIdentifier;
}
@Override
public Hashtable<BlockState, BlockState> getBlockStateCloaks() {
return new Hashtable<>();
}
@Override
public Pair<Item, Item> getItemCloak() {
return new Pair<>(this, cloakItem);
}
@Override
public void onCloak() { }
@Override
public void onUncloak() { }
}
在揭示发生时注册回调
RevelationHolder.registerRevelationCallback(new RevelationHolder.UncloakCallback() {
@Override
public void trigger(List<Identifier> advancements, List<Block> blocks, List<Item> items) {
for(Block block : blocks) {
if(Registry.BLOCK.getId(block).getNamespace().equals(MOD_ID)) {
...
<I dunno. Like show a popup or something. You tell me>
...
break
}
}
}
});
Discord
你将在 Spectrum 的 Discord 社区中找到许多乐于助人的人。这里总是有友好且热心的玩家。如果你喜欢,也欢迎随时加入!
Overview
Data Driven Block and Item Revelation system. Discover as you go!
Revelationary adds a way to gate the discovery of new blocks in the world via data pack, or API (for other mods). Using Revelationary, you can design your packs / mods progression in a way the player does not feel overwhelmed when starting a new playthrough. They can only perceive these worldgen blocks when they unlocked a specific advancement, making the block visible for them.
Example: The player sees a specific ore as stone. As they defeat the enderdragon they can now see and mine your ore in the world - it was always there from the start. Individual for each player and very performant.
Revelations
"[a] revelation is the revealing or disclosing of some form of truth or knowledge"
If you are the designer of a progression based mod or modpack you have come to the right place.
With Revelationary, you are able to use Data Packs or the Revelation API to gradually reveal blocks in the world as the player progresses. A plain stone filled cleft might be revealed as bursting with life and ore as the player defeats a boss or reaches an important milestone.
As long as a player does not have the necessary progress the blocks and items you register with Revelationary via API or Data Pack will just have cryptic names and in case of blocks in the world, will drop the same drops as the block it is disguised as, giving the player a seamless experience without getting flooded with unknown resources that they are not able to use at the start. Instead you can introduce resources just as they are needed.
Limitations
Besides visuals and drops, disguised blocks retain all the properties of the original block: Hitbox, if light passes through and everything else. Keep that in mind when searching for fitting candidates. A perfect disguise for your Ore would be stone or deepslate, since these share a lot of similarities. Similarly you could disguise your elusive plant with a poppy: Both have a small hitbox and players can walk through them.
If you are a programmer you can use the Revelation API to dynamically change your blocks properties depending on if they are visible to the player, or not. This way you could even disguise your flower as air: Giving it an empty hitbox when disguised, your players might not even know it is there until they can see them!
Find lots of examples for data packs & the API in Revelationary's wiki:
Registering Revelations via Data Pack
Have to be placed in the folder resources/data/<<mod_id>>/revelations
{
"advancement": "spectrum:milestones/reveal_quitoxic_reeds",
"block_states": {
"minecraft:grass": "minecraft:beacon",
"minecraft:tall_grass": "minecraft:obsidian",
"minecraft:tall_grass[half=upper]": "minecraft:netherite_block"
},
"items": {
"minecraft:nether_star": "minecraft:gunpowder"
}
}
Registering a "revelation aware" block or item
public class CloakedItem extends Item implements RevelationAware {
Identifier cloakAdvancementIdentifier;
Item cloakItem;
public CloakedItem(Settings settings, Identifier cloakAdvancementIdentifier, Item cloakItem) {
super(settings);
this.cloakAdvancementIdentifier = cloakAdvancementIdentifier;
this.cloakItem = cloakItem;
registerCloak();
}
@Override
public Identifier getCloakAdvancementIdentifier() {
return cloakAdvancementIdentifier;
}
@Override
public Hashtable<BlockState, BlockState> getBlockStateCloaks() {
return new Hashtable<>();
}
@Override
public Pair<Item, Item> getItemCloak() {
return new Pair<>(this, cloakItem);
}
@Override
public void onCloak() { }
@Override
public void onUncloak() { }
}
Registering a Callback when Revelations happen
RevelationHolder.registerRevelationCallback(new RevelationHolder.UncloakCallback() {
@Override
public void trigger(List<Identifier> advancements, List<Block> blocks, List<Item> items) {
for(Block block : blocks) {
if(Registry.BLOCK.getId(block).getNamespace().equals(MOD_ID)) {
...
<I dunno. Like show a popup or something. You tell me>
...
break
}
}
}
});
Discord
You will find a lot of helpful people on Spectrum's Discord. There always are friendly and helpful people around. Swing around too, if you like!
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
下载 Revelationary
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
NeoForge 的一次更新导致假玩家不再拥有进度。
本更新使 Revelationary API 中的假玩家检测能够正确返回假玩家所属者的进度,前提是假玩家与其放置者使用相同的配置文件 UUID。虽然实现方式略显复杂,但它确实恢复了正常工作。
相关的 NeoForge 变更:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧