如何控制指南针的指向? #89
-
|
我添加了一个类似指南针的物品,它继承自 CompassItem 类,但是我在其中没有找到控制指南针指针朝向的代码。 |
Beta Was this translation helpful? Give feedback.
Answered by
NekoCaffeine
Dec 15, 2020
Replies: 1 comment 3 replies
-
|
假设你问的是 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
SeraphJACK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
假设你问的是
1.12.2ItemCompass的构造函数里调用了addPropertyOverride来计算角度对应的
ResourceLocation是"angle"对应的物品模型是
\assets\minecraft\models\item\compass.json你可以看到穷举了一些角度
如果你需要改变这个行为 只需要重新提交一个
ResourceLocation是"angle"的IItemPropertyGetter在
apply函数中计算角度注意
SideOnly