xiaodobi2333
http://www.mcbbs.net/forum.php?m ... =%E6%9D%90%E8%B4%A8
我在这个链接的材质包里面发现了这段

type=armor
items=307
enchantmentIDs=1
texture.iron_layer_1=cape_blaze_armor
nbt.display.Name=ipattern:blaze cape


好像是一个 名字是 blaze cape 就显示一个材质的条件


好像就和种一样,不同的时间会显示不同的材质.


这个方面有没有什么好的教程.

⊙v⊙
我就说嘛...一定是optifine搞的鬼

材质包原作者没给教程
嘛 反正是optifine的功能
https://github.com/sp614x/optifi ... t_single.properties
  1. ###############################################################################
  2. # Sample configuration for OptiFine's Custom Items feature.
  3. # Based on the configuration for MCPatcher's Custom Item Textures mod.
  4. # Reference: https://bitbucket.org/prupe/mcpatcher/wiki/Custom_Item_Textures
  5. #
  6. ###############################################################################
  7. # cit_single.properties
  8. ###############################################################################
  9. # Sample properties file for use with MCPatcher's Custom Item Textures mod.
  10. #
  11. # This file is offered without any copyright restrictions. Please copy and
  12. # modify it to suit your needs.
  13. #
  14. # For each item you with to override with a custom texture, use this template
  15. # and create a .properties file in the mcpatcher/cit folder of your texture
  16. # pack.  Properties files can be organized into subfolders of any depth, as
  17. # long as everything is within the top-level mcpatcher/cit folder.
  18. #
  19. # Each properties file specifies a list of matching item IDs or names, a
  20. # replacement texture, and an optional set of rules specifying damage, stack
  21. # size, or NBT tags.
  22. #
  23. # All property names are case-sensitive.
  24. # All paths are relative to assets/minecraft unless otherwise stated.
  25. ###############################################################################

  26. ###############################################################################
  27. # General properties used by all types:
  28. ###############################################################################

  29. # (Optional) Type of texture replacement.
  30. # item:        Simple item texture replacement.  Applies to items in GUI, held
  31. #              in hand, and in the world.  If multiple properties files match
  32. #              the same item, only the first (sorted by weight, then by
  33. #              filename) is used.
  34. # enchantment: Overlay texture for enchantments (replaces misc/glint.png).  If
  35. #              multiple properties files match the same item, they are blended
  36. #              together using rules specified in the global cit.properties
  37. #              file.
  38. # armor:       Armor texture replacement.  Applies to armor models worn by
  39. #              players and mobs.  If multiple properties files match the same
  40. #              item, only the first (sorted by weight, then by filename) is
  41. #              used.
  42. # elytra:      Elytra texture replacement.  Applies to elytra model worn by
  43. #              players and mobs.  If multiple properties files match the same
  44. #              item, only the first (sorted by weight, then by filename) is
  45. #              used.
  46. # The default type is item.  Each type has additional properties defined in
  47. # later sections of this template.
  48. type=<item | enchantment | armor | elytra>

  49. # (Optional for type=enchantment, required for other types) List of items to
  50. # apply the replacement texture to.
  51. items=<list of item IDs>

  52. # (Optional) Replacement texture.  Can be a full path or just a name:
  53. # mytextures/excalibur.png -> mytextures/excalibur.png
  54. # excalibur                -> mcpatcher/cit/excalibur.png
  55. # Texture format including animation is handled differently depending on the
  56. # type.  See the type-specific sections below.
  57. #
  58. # If no texture is provided, MCPatcher will use the name of the properties
  59. # file,
  60. # mcpatcher/cit/excalibur.properties -> mcpatcher/cit/excalibur.png
  61. texture=<replacement texture>

  62. # (Optional) List of damage values.  Use the replacement texture only when the
  63. # item damage is a certain value or range.
  64. #
  65. # For items with durability, damage starts at 0 for a new item and increases as
  66. # it gets damaged.  The max damage an item can take varies, see
  67. # http://www.minecraftwiki.net/wiki/Item_durability
  68. #
  69. # For other items, damage represents different properties like potion type or
  70. # wool color.  See http://www.minecraftwiki.net/wiki/Data_values for specifics.
  71. damage=<damage values 0-65535>
  72. # Damage can also be given as a percentage:
  73. # damage=0-50%
  74. #
  75. # An optional bitmask applied to the item's damage before checking it against
  76. # the list of eligible damage values.  Examples,
  77. # Match any Fire Resistance potion:
  78. #   damage=3
  79. #   damageMask=15
  80. # Match any non-splash Fire Resistance potion:
  81. #   damage=3
  82. #   damageMask=16399
  83. # Match non-splash Fire Resistance I potion only:
  84. #   damage=3
  85. #   damageMask=16447
  86. # Match splash Fire Resistance II potion only:
  87. #   damage=16403
  88. #   damageMask=16447
  89. # For a simpler way to do potions, see the section at the end of this file.
  90. damageMask=<bitmask>

  91. # (Optional) List of stack sizes.  Use the replacement texture only when the
  92. # stack size is a certain value or range.
  93. stackSize=<stack sizes 0-65535>

  94. # (Optional) List of enchantment IDs or names.
  95. # The enchantment names may be short ("flame") or full ("minecraft:flame").
  96. # For reference, the vanilla enchantment IDs are
  97. # 0:  Protection
  98. # 1:  Fire Protection
  99. # 2:  Feather Falling
  100. # 3:  Blast Protection
  101. # 4:  Projectile Protection
  102. # 5:  Respiration
  103. # 6:  Aqua Affinity
  104. # 7:  Thorns
  105. # 16: Sharpness
  106. # 17: Smite
  107. # 18: Bane of Arthropods
  108. # 19: Knockback
  109. # 20: Fire Aspect
  110. # 21: Looting
  111. # 32: Efficiency
  112. # 33: Silk Touch
  113. # 34: Unbreaking
  114. # 35: Fortune
  115. # 48: Power
  116. # 49: Punch
  117. # 50: Flame
  118. # 51: Infinity
  119. enchantmentIDs=<enchantment IDs 0-255 or names>

  120. # (Optional) List of enchantment levels.
  121. enchantmentLevels=<enchantment levels 0-255>

  122. # (Optional) Hand
  123. # Hand in which the item is rendered (main hand, off hand)
  124. # When rendered in the GUI the item is considered to be in the main hand.
  125. # Default is "any"
  126. hand=any|main|off

  127. # Examples:
  128. # Match Silk Touch, any level:
  129. #   enchantmentIDs=33
  130. # Match Flame or Fire Aspect, level 3 or higher:
  131. #   enchantmentIDs=flame minecraft:fire_aspect
  132. #   enchantmentLevels=3-
  133. # Match any enchantment, with 8-10 total levels across all enchantments:
  134. #   enchantmentLevels=8-10

  135. # (Optional) NBT-based rule.  Use the replacement texture only when an NBT tag
  136. # has a specific value.  If multiple rules are provided, all of them must
  137. # match.  Use a utility like NBTExplorer to view the NBT tags for various
  138. # items.
  139. nbt.<tag>=<value>
  140. # Currently, only the following NBT types are supported:
  141. # - String, Integer, Short, Long, Double, Float - match exact value only
  142. # - Compound - Can match a specific tag or any tag (*).
  143. # - List - Can match a specific index (starting at 0) or any index (*).
  144. # Integer values can also be specified as hex color, for example #ff99cc.
  145. # The list size is named "count".
  146. #
  147. # Examples:
  148. # Match item display name:
  149. #   nbt.display.Name=My Sword
  150. #
  151. # Match item display name with special formatting:
  152. # NOTE: For best compatibility, use the escape sequence '\u00a7' instead of §:
  153. #   nbt.display.Name=\u00a74\u00a7oMy Sword
  154. #
  155. # Match item lore (first line only):
  156. #   nbt.display.Lore.0=My Lore Text
  157. #
  158. # Match item lore (any line):
  159. #   nbt.display.Lore.*=My Lore Text
  160. #
  161. # Strings can be matched in several ways:
  162. # - Exact value
  163. #   nbt.display.Name=Letter to Herobrine
  164. # Matches the exact string "Letter to Herobrine" and nothing else.
  165. #
  166. # - Wildcards using ? and *
  167. #   nbt.display.Name=pattern:Letter to *
  168. # Matches
  169. #   Letter to Herobrine
  170. #   Letter to a creeper
  171. # but not
  172. #   letter to Herobrine
  173. #
  174. # - Wildcards, case insensitive
  175. #   nbt.display.Name=ipattern:Letter to *
  176. # Matches
  177. #   Letter to Herobrine
  178. #   Letter to a creeper
  179. #   letter to Herobrine
  180. #
  181. # - Java regular expressions
  182. #   (See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html)
  183. #   nbt.display.Name=regex:Letter (to|from) .*
  184. # Matches
  185. #   Letter to Herobrine
  186. #   Letter from Herobrine
  187. # but not
  188. #   letter to Herobrine
  189. #   A Letter to Herobrine
  190. #
  191. # - Java regular expressions, case insensitive
  192. #   nbt.display.Name=iregex:Letter (to|from) .*
  193. # Matches
  194. #   Letter to Herobrine
  195. #   Letter from Herobrine
  196. #   letter to Herobrine
  197. # but not
  198. #   A Letter to Herobrine
  199. #
  200. # NOTE: Any backslashes must be doubled as well.  Literal backslashes within a
  201. # regular expression or wildcard must be quadrupled.
  202. # Correct:
  203. #   nbt.display.name=regex:\\d+
  204. #   nbt.display.name=regex:\\\\
  205. #   nbt.display.name=/\\/\\
  206. # Wrong:
  207. #   nbt.display.name=regex:\d+
  208. #   nbt.display.name=regex:\\
  209. #   nbt.display.name=/\/\

  210. ###############################################################################
  211. # Type-specific properties
  212. ###############################################################################

  213. ###############################################################################
  214. # Items
  215. ###############################################################################

  216. type=item

  217. # Texture format:
  218. # Item replacement textures are stitched into items.png, and thus follow the
  219. # same rules as normal item textures.  In particular, this means that
  220. # animations must use Mojang's system of .mcmeta files for frame order and
  221. # timing.
  222. texture=<replacement texture>

  223. # (Optional) Replacement for alternate textures.
  224. # For items with more than one texture, this allows you to specify replacements
  225. # for each separately.  For example, the vanilla bow has four possible textures
  226. # depending on its state:  bow_standby, bow_pulling_0, bow_pulling_1,
  227. # bow_pulling_2.  To replace all four, you could use
  228. #   texture.bow_standby=my_special_bow_standby
  229. #   texture.bow_pulling_0=my_special_bow_pulling_0
  230. #   texture.bow_pulling_1=my_special_bow_pulling_1
  231. #   texture.bow_pulling_2=my_special_bow_pulling_2
  232. # Potions also have two textures.  To replace them, use
  233. #   texture.potion_bottle_drinkable=...
  234. #   -or-
  235. #   texture.potion_bottle_splash=...
  236. #   texture.potion_overlay=...
  237. # If no texture.<name> property matches, the generic texture property is used
  238. # instead.
  239. texture.<name>=<replacement texture>

  240. # (Optional) If multiple properties files match the same item, the highest
  241. # weighted one is used.  In the event of a tie, the properties filenames are
  242. # compared next.  The default weight is 0.
  243. weight=<integer>

  244. ###############################################################################
  245. # Enchantments
  246. ###############################################################################

  247. type=enchantment

  248. # Texture format:
  249. # The enchantment texture can be any resolution.  To animate an enchantment,
  250. # use the anim/*.properties method with
  251. #   to=<full path to enchantment texture>
  252. texture=<enchantment texture>

  253. # (Optional) Blend method when applying texture to the texture below it.  See
  254. # Better Skies for a list of valid methods.  The default is add.
  255. blend=<blend method>

  256. # (Optional) Scrolling speed of texture.
  257. # The default value is 0 (no scrolling).
  258. speed=<value>

  259. # (Optional) Angle of texture relative to the item.  If speed is non-zero, the
  260. # texture will also scroll in this direction.
  261. # The default value is 0.
  262. rotation=<0-360 degrees>

  263. # (Optional) Specifies a unique layer and the ordering of the layers as they
  264. # overlap each other.  If two or more effects use the same layer, weight
  265. # determines which effect is rendered (the other is not rendered).
  266. # The default layer is 0 (bottommost).
  267. layer=<integer>

  268. # (Optional) Relative priority of the enchantment within a layer.
  269. # Of the matching effects, only the highest weighted one within a layer is
  270. # rendered.
  271. # In other words,
  272. # - The layer property determines the ORDER in which effects are rendered.
  273. # - The weight property determines WHICH effect is rendered for each layer.
  274. # If two effects have the same weight and layer, the filename is used as a
  275. # tiebreaker.
  276. # The default weight is 0.
  277. weight=<integer>

  278. # (Optional, for cycling enchantments only) Duration in seconds of enchantment
  279. # in a cycle.
  280. # The default is 1 second.
  281. duration=<seconds>

  282. ###############################################################################
  283. # Armor
  284. ###############################################################################

  285. type=armor

  286. # Texture format:
  287. # The texture should match the format of the corresponding armor texture.  For
  288. # animated textures, use the anim/*.properties method with
  289. #   to=<path to replacement texture>

  290. # (Required) Replacement textures.  You need a replacement for each texture in
  291. # textures/models/armor for that armor type.
  292. # For diamond armor,
  293. #   texture.diamond_layer_1=my_diamond_armor_1
  294. #   texture.diamond_layer_2=my_diamond_armor_2
  295. # Leather armor has four layers:
  296. #   texture.leather_layer_1=...
  297. #   texture.leather_layer_1_overlay=...
  298. #   texture.leather_layer_2=...
  299. #   texture.leather_layer_2_overlay=...
  300. # If no texture.<name> property is matching, the generic texture will be used.
  301. texture.<name>=<replacement texture>

  302. # (Optional) If multiple properties files match the same armor, the highest
  303. # weighted one is used.  In the event of a tie, the properties filenames are
  304. # compared next.  The default weight is 0.
  305. weight=<integer>

  306. ###############################################################################
  307. # Potions
  308. ###############################################################################

  309. # http://www.minecraftwiki.net/wiki/Data_values#Potions
  310. # As an alternative to listing potion damage values, you can specify
  311. # replacement textures for potions using a filename based system.  Note that
  312. # everything described here CAN be done via cit properties files; this is just
  313. # a shortcut.
  314. #
  315. # There are two directories for potions:
  316. #   mcpatcher/cit/potion/normal - non-splash potions
  317. #   mcpatcher/cit/potion/splash - splash potions
  318. #   mcpatcher/cit/potion/linger - lingering potions
  319. #
  320. # Within either directory, create a .png file with the name of the potion
  321. # effect.  No properties files are necessary.
  322. #   absorption.png
  323. #   blindness.png
  324. #   confusion.png
  325. #   damageboost.png    (*)
  326. #   digslowdown.png
  327. #   digspeed.png
  328. #   fireresistance.png (*)
  329. #   harm.png           (*)
  330. #   heal.png           (*)
  331. #   healthboost.png
  332. #   hunger.png
  333. #   invisibility.png   (*)
  334. #   jump.png
  335. #   moveslowdown.png   (*)
  336. #   movespeed.png      (*)
  337. #   nightvision.png    (*)
  338. #   poison.png         (*)
  339. #   regeneration.png   (*)
  340. #   resistance.png
  341. #   saturation.png
  342. #   waterbreathing.png
  343. #   weakness.png       (*)
  344. #   wither.png
  345. # The names are the same as the potion.* properties in Custom Colors'
  346. # color.properties file.  Case matters.  Only potions marked (*) are obtainable
  347. # in-game.  The others can only be created via editing.
  348. #
  349. # The replacement png will automatically be used for that potion type; no
  350. # properties file required.  Note that this replaces BOTH
  351. # potion.png/potion_splash.png and potion_contents.png from the standard potion
  352. # rendering.  So be sure to include the colored liquid in the replacement art.
  353. #
  354. # Similarly, you can replace textures for the various "no effect" potions.
  355. # These have non-splash versions only, and again only the ones marked (*)
  356. # actually exist in-game.  The rest are in the code and are listed here only
  357. # for completeness.
  358. #   artless.png
  359. #   awkward.png        (*)
  360. #   bland.png
  361. #   bulky.png
  362. #   bungling.png
  363. #   buttered.png
  364. #   charming.png
  365. #   clear.png
  366. #   cordial.png
  367. #   dashing.png
  368. #   debonair.png
  369. #   elegant.png
  370. #   fancy.png
  371. #   flat.png
  372. #   foul.png
  373. #   gross.png
  374. #   harsh.png
  375. #   milky.png
  376. #   mundane.png        (*)
  377. #   odorless.png
  378. #   potent.png
  379. #   rank.png
  380. #   sparkling.png
  381. #   stinky.png
  382. #   suave.png
  383. #   thick.png          (*)
  384. #   thin.png
  385. #   uninteresting.png
  386. #
  387. # If you'd rather have a single texture for all "no effect" potions, this file
  388. # is used as a fallback for any that do not have a specific replacement as
  389. # listed above:
  390. #   mcpatcher/cit/potion/normal/other.png
  391. #
  392. # Two additional textures (non-splash only) can also be provided:
  393. #   mcpatcher/cit/potion/normal/water.png - plain water bottle (item 373:0)
  394. #   mcpatcher/cit/potion/normal/empty.png - empty bottle (item 374)
复制代码


大概就是这样,有每项的使用解释,太长我就不特意翻译了,想深究自己慢慢看哈...
type=<item | enchantment | armor | elytra>分别是物品,附魔装甲,还有那个滑翔翅
items=<list of item IDs>物品的ID
texture=<replacement texture> mcpatcher/cit/下的材质名
damage=<damage values 0-65535>附加值
damageMask=<bitmask> 药水附加值相关
stackSize=<stack sizes 0-65535>物品叠加数
enchantmentIDs=<enchantment IDs 0-255 or names> 附魔
enchantmentLevels=<enchantment levels 0-255> 附魔等级
hand=any|main|off 任意手,主手,非主手时
nbt.<tag>=<value> 当NBT标签为某一个值时

附魔
texture.<name>=<replacement texture>特指替换的材质,因为有些物品的材质不止一层
weight=<integer> 优先度  用于若另一个条件也满足时决定使用哪个
speed=<value> 材质的速度,应该是动态类贴图用的
等等...反正你应该也不会用到

还有装甲的...

nbt那个
nbt.display.Name=My Sword 物品名字为My Sword时
nbt.display.Name=\u00a74\u00a7oMy Sword 同上,多了个颜色码
nbt.display.Lore.0=My Lore Text 物品lore,也就是物品描述的首行为那个时
nbt.display.Lore.1=My Lore Text 物品lore,也就是物品描述的第2行为那个时
nbt.display.Lore.*=My Lore Text 物品lore,也就是物品描述的任意行为那个时
nbt.display.Name=ipattern:Letter to *  差不多...ipattern为不区分大小写
等......

结构看着挺简单的....我好像已经知道怎么用了

所以你的这个应该就是
当这个铁胸甲的NBT标签display,也就是名字为blaze cape(用法就是铁毡改名对吧...)(不区分大小写),并带有火焰保护附魔时
材质使用mcpatcher/cit/下的blaze_armor(至于那个iron_layer_1,记得和optifine允许多个材质有关)



发现了什么不得了的东西,你发的网址那位大哥竟然标明原创= .=  我这就举报去....

⊙v⊙
⊙v⊙ 发表于 2017-2-23 19:06
我就说嘛...一定是optifine搞的鬼

材质包原作者没给教程

发在视频板块啊,还以为是展示....当我没说

xiaodobi2333
ipattern为不区分大小写

原来如此,
谢谢了