Famine_hong
请问Fabric中EntityAttributes类中的setTracked(true)的作用,如:
public static final EntityAttribute GENERIC_MAX_HEALTH = register("generic.max_health", (new ClampedEntityAttribute("attribute.name.generic.max_health", 20.0D, 1.0D, 1024.0D)).setTracked(true));//这里有
public static final EntityAttribute GENERIC_FOLLOW_RANGE = register("generic.follow_range", new ClampedEntityAttribute("attribute.name.generic.follow_range", 32.0D, 0.0D, 2048.0D));//但这个没有
喜欢知道的大佬能够解答,万分感谢。


无敌三脚猫
这意味着服务端会把这个属性同步到客户端
有些属性客户端是要知道的,比如血量和攻速,因为跟显示有关
有些属性客户端不需要知道,就不写setTracked(true)

第一页 上一页 下一页 最后一页