动画物品
要为物品添加动画效果,你需要在面板配置中添加以下设置:
- 1.13+
- 1.8.8 - 1.12.2
panels:
animationTester:
perm: default
rows: 1
title: '&a动画测试'
empty: BLACK_STAINED_GLASS_PANE
animatevalue: 6 # 添加此配置项
panels:
animationTester:
perm: default
rows: 1
title: '&a动画测试'
empty: WOOL
emptyID: 15
animatevalue: 6 # 添加此配置项
如果数字设为6,动画从0循环到6,动画将分为7个动画帧。
调整从0到6的循环速度需要在主配置文件config.yml中修改refresh-delay的值。
下面是item关于动画物品的配置,循环播放七个(0到6)动画帧。
- 1.13+
- 1.8.8 - 1.12.2
item:
2:
material: BARRIER
name: '这是默认物品'
animate0:
material: PURPLE_STAINED_GLASS_PANE
name: '&5变色龙!'
animate1:
material: RED_STAINED_GLASS_PANE
name: '&c变色龙!'
animate2:
material: ORANGE_STAINED_GLASS_PANE
name: '&6变色龙!'
animate3:
material: YELLOW_STAINED_GLASS_PANE
name: '&e变色龙!'
animate4:
material: LIME_STAINED_GLASS_PANE
name: '&a变色龙!'
animate5:
material: LIGHT_BLUE_STAINED_GLASS_PANE
name: '&9变色龙!'
animate6:
material: MAGENTA_STAINED_GLASS_PANE
name: '&d变色龙!'
item:
2:
material: BARRIER
name: '这是默认物品'
animate0:
material: WOOL
ID: 14
name: '&5变色龙!'
animate1:
material: WOOL
ID: 1
name: '&c变色龙!'
animate2:
material: WOOL
ID: 4
name: '&6变色龙!'
animate3:
material: WOOL
ID: 5
name: '&e变色龙!'
animate4:
material: WOOL
ID: 3
name: '&a变色龙!'
animate5:
material: WOOL
ID: 11
name: '&9变色龙!'
animate6:
material: WOOL
ID: 2
name: '&d变色龙!'
提示
如果缺少某个帧(例如缺少第3帧),循环到第3帧时会显示默认物品(显示BARRIER)。
注意
动画标签可添加到任何物品中,但不支持快捷栏物品。你可以在任何Has条件段中添加动画效果。