Class NPCPreset

java.lang.Object
com.pixelmonmod.pixelmon.api.npc.NPCPreset

public class NPCPreset extends Object
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<NPCPreset> CODEC
    • NETWORK_CODEC

      public static final com.mojang.serialization.Codec<NPCPreset> NETWORK_CODEC
  • Method Details

    • key

      public net.minecraft.resources.ResourceLocation key()
    • createNPC

      public NPC createNPC(net.minecraft.world.level.Level level)
    • createBuilder

      public NPCBuilder createBuilder()
    • apply

      public void apply(@NotNull @NotNull NPC npc)
    • toJson

      public com.google.gson.JsonElement toJson()
    • saveToFile

      public void saveToFile(File file) throws IOException
      Throws:
      IOException
    • fromNPC

      public static NPCPreset fromNPC(@NotNull @NotNull NPC npc)
    • fromJson

      public static NPCPreset fromJson(@NotNull @NotNull com.google.gson.JsonElement json)
    • builder

      public static NPCPreset.Builder builder()