/// <summary> /// Creates a function tag minecraft:tick, and adds the specified function id to it. /// </summary> /// <remarks> /// The specified function will run every tick. /// </remarks> /// <param name="function">The function's ResourceLocation to run every tick</param> public void CreateTickTag(ResourceLocation function) { if (TickTag == null) { EnsureMCNamespace(); TickTag = new FunctionTag(new ResourceLocation(MinecraftNamespace, "tick")); } TickTag.Add(function); }
public FunctionTag AddFunctionTag(string id, params ResourceLocation[] values) { FunctionTag tag = new FunctionTag(new ResourceLocation(this, id)); foreach (ResourceLocation rl in values) { tag.Add(rl); } return(tag); }
/// <summary> /// Creates a function tag minecraft:load, and adds the specified function id to it. /// </summary> /// <param name="function">The function's ResourceLocation to run on reload</param> public void CreateLoadTag(ResourceLocation function) { if (function.Namespace.LoadFunction == null) { if (LoadTag == null) { EnsureMCNamespace(); LoadTag = new FunctionTag(new ResourceLocation(MinecraftNamespace, "load")); } LoadTag.Add(function); } }