Path Under Gates
Minecraft 模组,允许在栅栏门下方存在草径。
适用于 1.18.2、1.19.2/1.19.3 和 1.20.1/1.20.2 的新版和改进版!现在具有更好的模组兼容性!
附:我讨厌 CurseForge 编辑器。
白名单/黑名单格式说明
格式如下:
modid:name:properties
名称部分可以使用通配符 *。如果未指定名称,则等同于名称为通配符。
并非必须定义方块的所有属性,白名单/黑名单将匹配已定义的任意属性,而忽略未定义的属性。属性之间以 , 分隔,每个属性均为 key=value 格式的键值对。属性部分也可以使用通配符 *。如果未定义任何属性,则等同于它们为通配符。
如果 modid 被定义为 ore,则会针对 原版 和 Forge 标签进行匹配,其中名称部分应为标签路径。如果模组使用了自定义的标签命名空间,则必须将其指定为 modid 才能正确匹配。标签的路径部分作为名称指定。此情况下不适用属性,使用属性会导致标签匹配失败。
当仅定义了 modid 和 name 时,系统会优先尝试与标签进行匹配。若失败,则条目将尝试与方块进行匹配。
示例条目包括:
"minecraft:*" - minecraft 命名空间下的所有方块
"minecraft" - minecraft 命名空间下的所有方块
"minecraft:stone" - 匹配 minecraft:stone
"minecraft:jungle_log" - 所有 minecraft:jungle_log 变体
"minecraft:jungle_log:*" - 所有 minecraft:jungle_log 变体
"minecraft:jungle_log:axis=x" — 所有具有属性 axis=x 的 minecraft:jungle_log 变体,其他属性将被忽略
"minecraft:oak_stairs:facing=east" - 所有具有属性 facing=east 的 minecraft:oak_stairs 变体,其他属性将被忽略
"minecraft:oak_stairs:half=top" - 所有具有属性 half=top 的 minecraft:oak_stairs 变体,其他属性将被忽略
"minecraft:oak_stairs:facing=east,half=top" - 所有具有属性 facing=east 和 half=top 的 minecraft:oak_stairs 变体,其他属性将被忽略
"ore:spruce_logs" — 属于 spruce_logs 原版标签的所有方块
"ore:fences/wooden" — 属于 fences/wooden Forge 标签的所有方块
"minecraft:logs" — 属于 logs 原版标签的所有方块(这是一个标签,尽管其外观像是一个方块)
新功能:模组化路径兼容性
当玩家使用铲子右键点击一个方块时,会运行一段代码来判断该方块是否能被压平为路径。这段代码会检查该方块上方是否有遮挡物,以及该方块是否具备转换为路径的可能性。本模组通过拦截并接管这段代码,自行执行检查和转换操作。对于新增的模组化路径,在“可能性转换”这一部分存在一个问题。原版方块的转换信息存储在已知位置,但模组添加的方块可能将其存储在任何地方。为了让本模组能够执行转换,它需要知道具体的转换目标。基于此考虑,本模组现在具备了接收这些信息的能力。这提供两种实现方式:
配置文件
格式类似于白名单/黑名单。其形式为:
modid:name|modid:name:properties
第一种选项采用相同格式,但不允许指定属性。第二种选项则允许指定属性,与列表格式类似。任何未指定的属性均默认为默认值。列表格式与这些配置项的主要区别在于:它以 | 分隔成一对显示,并且不允许使用标签/通配符。服务器管理员可能会滥用此配置设置来执行非预期操作,例如将煤炭块转化为钻石块,但相信没有人会如此放纵。
示例条目包括:
minecraft:snow_block|morepaths:snow_path - 雪块将被压平为来自 morepath 模组的雪径方块
undergarden:deepsoil|ugpaths:deepsoil_path - 来自模组 undergarden 的深层土壤块将被压平为来自 ugpaths 的深层土壤径方块
minecraft:stone|minecraft:stone_slab:type=top - 石头块将被压平为上半部分的石头台阶方块
minecraft:coal_block|minecraft:diamond_block - 煤炭块将被“压平”为钻石块,尽管实际上没人会这么做
InterModComms
模组作者现在可以使用 Forge 提供的 InterModComms 功能,来告知本模组某个方块在被铲子尝试压平时应转换成的目标方块。
发送到此模组的消息将被处理为 Block-BlockState 对。这是通过发送一个方法为 "registerpath" 的消息,并附带一个长度为 2 的 Object[] 数组来实现的,其中第一个位置包含一个 Block 对象,第二个位置包含一个 BlockState 对象。请参阅 GitHub readme 获取示例,因为 CurseForge 编辑器非常糟糕。
其他版本:
1.16.5:
Path Under Gates
允许在栅栏门下方存在草径的 Minecraft 模组。
白名单/黑名单格式
格式如下:
modid:name:properties
名称可以是通配符操作符 *。如果未指定名称,则等同于名称为通配符。
并非必须定义方块的所有属性,白名单/黑名单将匹配任何已定义的属性,但会忽略未定义的属性。属性之间以 , 分隔,每个属性都是格式为 key=value 的键值对。属性也可以是通配符操作符 *。如果未定义任何属性,则等同于它们为通配符。
如果 modid 定义为 ore,则将针对 原版 和 Forge 标签进行匹配,其中 name 将是标签路径。如果模组使用自己的标签命名空间,则必须将其指定为 modid 才能正确匹配。标签的路径部分作为 name 指定。在这种情况下属性不适用,使用它们会导致无法匹配标签。
当仅定义了 modid 和 name 时,标签将首先尝试进行匹配。如果失败,条目将尝试与方块进行匹配。
示例条目包括:
"minecraft:*" - minecraft 域中的所有方块
"minecraft" - minecraft 域中的所有方块
"minecraft:stone" - 匹配 minecraft:stone
"minecraft:jungle_log" - 所有 minecraft:jungle_log 变体
"minecraft:jungle_log:*" - 所有 minecraft:jungle_log 变体
"minecraft:jungle_log:axis=x" — 属性为 axis=x 的其他属性被忽略的所有 minecraft:jungle_log 变体
"minecraft:oak_stairs:facing=east" - 属性为 facing=east 的其他属性被忽略的所有 minecraft:oak_stairs 变体
"minecraft:oak_stairs:half=top" - 属性为 half=top 的其他属性被忽略的所有 minecraft:oak_stairs 变体
"minecraft:oak_stairs:facing=east,half=top" - 属性为 facing=east 和 half=top 的其他属性被忽略的所有 minecraft:oak_stairs 变体
"ore:spruce_logs" — spruce_logs 原版标签下的所有方块
"ore:fences/wooden" — fences/wooden Forge 标签下的所有方块
"minecraft:logs" — logs 原版标签下的所有方块(这是一个标签,尽管看起来像一个方块)
最后注意:如果您仍然需要更多关于方块的帮助,请参见适用于 1.12 版本的 CraftTweaker wiki。其格式几乎是该模组中 Bracket Handlers 的一对一映射。
1.12.2:
Path Under Gates
允许在栅栏门下方存在草径的 Minecraft 模组。
白名单/黑名单格式
格式如下:
modid:name:properties
名称可以是通配符操作符 *。如果未指定名称,则等同于名称为通配符。
并非必须定义方块的所有属性,白名单/黑名单将匹配任何已定义的属性,但会忽略未定义的属性。属性之间以 , 分隔,每个属性都是格式为 key=value 的键值对。属性也可以是通配符操作符 *。如果未定义任何属性,则等同于它们为通配符。属性也可以是元数值(整数),用于定义方块状态。
如果将 modid 定义为 ore,则匹配的是矿石字典(Ore Dictionary),其中名称将成为矿石字典中的标签。在这种情况下,属性不适用。
注意:矿石字典中的条目与此模组使用的条目解析方式不同。这是由于 Forge 访问矿石字典条目的方式所致。例如,无法区分 <minecraft:log>、<minecraft:log:0> 或 <minecraft:log:variant=oak,axis=y>。这意味着它们通常具有过于具体的元数据值(meta values),这些值映射到单个方块状态(blockstate)(除非它们的元数据值使用了通配符)。
示例条目包括:
minecraft:* - minecraft 域中的所有方块
minecraft - minecraft 域中的所有方块
minecraft:glass - 所有 minecraft:glass 变体
minecraft:stone - 所有 minecraft:stone 变体
minecraft:stone:* - 所有 minecraft:stone 变体
minecraft:stone:variant=granite - 具有属性 variant=granite 的所有 minecraft:stone 变体,其他属性被忽略
minecraft:oak_stairs:facing=east - 具有属性 facing=east 的所有 minecraft:oak_stairs 变体,其他属性被忽略
minecraft:oak_stairs:half=top - 具有属性 half=top 的所有 minecraft:oak_stairs 变体,其他属性被忽略
minecraft:oak_stairs:facing=east,half=top - 同时具有属性 facing=east 和 half=top 的所有 minecraft:oak_stairs 变体,其他属性被忽略
minecraft:log:0 - 元数据值为 0 的 minecraft:log,解析为 minecraft:log:variant=oak,axis=y
ore:woodLog - 所有属于 woodLog 矿石字典条目的方块
最后提示:如果你仍然需要更多帮助,请参阅适用于 1.12 版本的 CraftTweaker wiki。其格式几乎与那个模组中的 Bracket Handlers 完全对应。
Path Under Gates
Minecraft mod that allows grass paths to exist under fence gates.
New and improved version for 1.18.2, 1.19.2/1.19.3, and 1.20.1/1.20.2! Now with improved mod compatibility!
P.S. I hate the CurseForge editor.
White/Blacklist formatting
Format is of the form:
modid:name:properties
Name may be the wildcard operator *. If no name is specified, it is the same as having name being a wildcard.
Not all properties of a block must be defined, the white/blacklists will match against any properties defined but will ignore those that aren't. Properties are separated , with each property being a key-value pair of the format key=value. The properties may also be the wildcard operator *. If no properties are defined it is the same as them being a wildcard.
If modid is defined as ore, vanilla and Forge tags will be matched against, where name will be a tag path. If a mod uses it's own tag namespace, that must be specified as the modid to match properly. The path portion of the tag is specified as the name. Properties do not apply in this case, and using them will cause a failure to match a tag.
When only modid and name are defined, tags will attempt to be matched against first. Failing that, the entry will try to be matched to a block instead.
Example entries include:
"minecraft:*" - all blocks in the minecraft domain
"minecraft" - all blocks in the minecraft domain
"minecraft:stone" - matches minecraft:stone
"minecraft:jungle_log" - all minecraft:jungle_log varieties
"minecraft:jungle_log:*" - all minecraft:jungle_log varieties
"minecraft:jungle_log:axis=x" — all minecraft:jungle_log varieties with the property axis=x other properties ignored
"minecraft:oak_stairs:facing=east" - all minecraft:oak_stairs varieties with the property facing=east, other properties ignored
"minecraft:oak_stairs:half=top" - all minecraft:oak_stairs varieties with the property half=top, other properties ignored
"minecraft:oak_stairs:facing=east,half=top" - all minecraft:oak_stairs varieties with the properties facing=east and half=top, other properties ignored
"ore:spruce_logs" — all blocks under the spruce_logs vanilla tag
"ore:fences/wooden" — all blocks under the fences/wooden Forge tag
"minecraft:logs" — all blocks under the logs vanilla tag (this is a tag, though it looks like a block)
New Feature: Modded Path Compatilibility
When a block is right-clicked with a shovel, a piece of code runs that determines if it can be flattened into a path. This code checks if the block is not underneath something and if the block has a possible conversion to a path. This mod works by preempting that code and doing the check and conversion itself. With mod added paths, there is an issue with the "possible conversion" part. Vanilla blocks have this information stored in a known location, but mod added blocks can have it anywhere. For this mod to perform the conversion, it needs to know what it should be. With that in mind, this mod now has the ability to receive that information. This comes in 2 flavors:
Config File
Formatting is similar to whitelisting/blacklisting. It is of the form:
modid:name|modid:name:properties
The first option is the same format but does not allow for properties to be specified. The second does however, just like the list formatting. Any unspecified properties are assumed default. The major differences between the list format and these is that it is presented as a pair separated by a | and that tags/wildcards are NOT allowed. This config setting can be abused by the server owner to do unintended things, like turn blocks of coal into blocks of diamond, but surely none are so debauched.
Exaple entries include:
minecraft:snow_block|morepaths:snow_path - Snow block will be flattened into snow path block from morepath mod
undergarden:deepsoil|ugpaths:deepsoil_path - Deepsoil block from mod undergarden will be flattened into deepsoil ath block from ugpaths
minecraft:stone|minecraft:stone_slab:type=top - Stone block will be flattened into top-half stone slab block
minecraft:coal_block|minecraft:diamond_block - Coal block will be "flattened" into diamond block, though none would ever do this
InterModComms
Mod authors will now be able to tell this mod what a block should turn into when trying to be flattened with a shovel. This involves the use of the InterModComms feature provided by Forge.
Messages sent to to this mod will be processed into a Block-BlockState pair. This is done by sending a a message with "registerpath" as its method and an Object[] of length 2 containing a Block object in the first position and a BlockState object in the second. See the GitHub readme for examples, because the CurseForge editor is terrible.
Other Versions:
1.16.5:
Path Under Gates
Minecraft mod that allows grass paths to exist under fence gates.
White/Blacklist formatting
Format is of the form:
modid:name:properties
Name may be the wildcard operator *. If no name is specified, it is the same as having name being a wildcard.
Not all properties of a block must be defined, the white/blacklists will match against any properties defined but will ignore those that aren't. Properties are separated , with each property being a key-value pair of the format key=value. The properties may also be the wildcard operator *. If no properties are defined it is the same as them being a wildcard.
If modid is defined as ore, vanilla and Forge tags will be matched against, where name will be a tag path. If a mod uses it's own tag namespace, that must be specified as the modid to match properly. The path portion of the tag is specified as the name. Properties do not apply in this case, and using them will cause a failure to match a tag.
When only modid and name are defined, tags will attempt to be matched against first. Failing that, the entry will try to be matched to a block instead.
Example entries include:
"minecraft:*" - all blocks in the minecraft domain
"minecraft" - all blocks in the minecraft domain
"minecraft:stone" - matches minecraft:stone
"minecraft:jungle_log" - all minecraft:jungle_log varieties
"minecraft:jungle_log:*" - all minecraft:jungle_log varieties
"minecraft:jungle_log:axis=x" — all minecraft:jungle_log varieties with the property axis=x other properties ignored
"minecraft:oak_stairs:facing=east" - all minecraft:oak_stairs varieties with the property facing=east, other properties ignored
"minecraft:oak_stairs:half=top" - all minecraft:oak_stairs varieties with the property half=top, other properties ignored
"minecraft:oak_stairs:facing=east,half=top" - all minecraft:oak_stairs varieties with the properties facing=east and half=top, other properties ignored
"ore:spruce_logs" — all blocks under the spruce_logs vanilla tag
"ore:fences/wooden" — all blocks under the fences/wooden Forge tag
"minecraft:logs" — all blocks under the logs vanilla tag (this is a tag, though it looks like a block)
Final Note: If you still need more help with blocks, see the CraftTweaker wiki for version 1.12. The formatting is almost a one-to-one mapping of Bracket Handlers from that mod.
1.12.2:
Path Under Gates
Minecraft mod that allows grass paths to exist under fence gates.
White/Blacklist formatting
Format is of the form:
modid:name:properties
Name may be the wildcard operator *. If no name is specified, it is the same as having name being a wildcard.
Not all properties of a block must be defined, the white/blacklists will match against any properties defined but will ignore those that aren't. Properties are separated , with each property being a key-value pair of the format key=value. The properties may also be the wildcard operator *. If no properties are defined it is the same as them being a wildcard. Properties may also be a meta value, as an integer, that defines a blockstate.
If modid is defined as ore, the ore dictionary matched against, where name will be a label in the ore dictionary. Properties do not apply in this case.
Note: Entries in the ore dictionary are parsed differently than those used by this mod. This is due to how ore dictionary entries are accessed in Forge. There is no way to differentiate between, for example, <minecraft:log>, <minecraft:log:0>, or <minecraft:log:variant=oak,axis=y>. This means they often have overly specific meta values that map to a single blockstate (unless they've got a wildcard for a meta value).
Example entries include:
minecraft:* - all blocks in the minecraft domain
minecraft - all blocks in the minecraft domain
minecraft:glass - all minecraft:glass varieties
minecraft:stone - all minecraft:stone varieties
minecraft:stone:* - all minecraft:stone varieties
minecraft:stone:variant=granite - all minecraft:stone varieties with the property variant=granite, other properties ignored
minecraft:oak_stairs:facing=east - all minecraft:oak_stairs varieties with the property facing=east, other properties ignored
minecraft:oak_stairs:half=top - all minecraft:oak_stairs varieties with the property half=top, other properties ignored
minecraft:oak_stairs:facing=east,half=top - all minecraft:oak_stairs varieties with the properties facing=east and half=top, other properties ignored
minecraft:log:0 - minecraft:log with meta value 0, resolves to minecraft:log:variant=oak,axis=y
ore:woodLog - all blocks under the woodLog ore dictionary entry
Final Note: If you still need more help, see the CraftTweaker wiki for version 1.12. The formatting is almost a one-to-one mapping of Bracket Handlers from that mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧