예제 #1
0
 /// <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);
 }
예제 #2
0
        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);
        }
예제 #3
0
 /// <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);
     }
 }