Final fixes to particles, updated copyright to 2023

This commit is contained in:
Paul
2023-02-05 19:02:37 +10:00
parent d2a38ca33c
commit ed55dd21af
1194 changed files with 1375 additions and 1328 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 2022 Cobblemon Contributors Copyright (C) 2023 Cobblemon Contributors
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
+1
View File
@@ -0,0 +1 @@
[17:34:22] [Test worker/INFO]: Booting LaxPermissionValidator, permissions will be checked using Minecrafts permission level system, see https://minecraft.fandom.com/wiki/Permission_level
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -12,9 +12,15 @@ import com.cobblemon.mod.common.api.net.NetworkPacket
import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.server.network.ServerPlayerEntity
interface CobblemonImplementation { interface CobblemonImplementation {
val modAPI: ModAPI
fun isModInstalled(id: String): Boolean fun isModInstalled(id: String): Boolean
} }
enum class ModAPI {
FABRIC,
FORGE
}
interface NetworkDelegate { interface NetworkDelegate {
fun sendPacketToPlayer(player: ServerPlayerEntity, packet: NetworkPacket) fun sendPacketToPlayer(player: ServerPlayerEntity, packet: NetworkPacket)
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -10,25 +10,14 @@ package com.cobblemon.mod.common.api.abilities
import com.cobblemon.mod.common.Cobblemon import com.cobblemon.mod.common.Cobblemon
import com.cobblemon.mod.common.api.data.DataRegistry import com.cobblemon.mod.common.api.data.DataRegistry
import com.cobblemon.mod.common.api.data.JsonDataRegistry
import com.cobblemon.mod.common.api.reactive.SimpleObservable import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.battles.runner.GraalShowdown import com.cobblemon.mod.common.battles.runner.GraalShowdown
import com.cobblemon.mod.common.net.messages.client.data.AbilityRegistrySyncPacket import com.cobblemon.mod.common.net.messages.client.data.AbilityRegistrySyncPacket
import com.cobblemon.mod.common.pokemon.abilities.HiddenAbilityType import com.cobblemon.mod.common.pokemon.abilities.HiddenAbilityType
import com.cobblemon.mod.common.util.asTranslated
import com.cobblemon.mod.common.util.cobblemonResource import com.cobblemon.mod.common.util.cobblemonResource
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
import com.google.gson.JsonElement
import com.google.gson.reflect.TypeToken
import net.minecraft.resource.ResourceManager import net.minecraft.resource.ResourceManager
import java.lang.reflect.Type
import net.minecraft.resource.ResourceType import net.minecraft.resource.ResourceType
import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.text.MutableText
import net.minecraft.util.Identifier
/** /**
* Registry for all known Abilities * Registry for all known Abilities
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,12 +1,12 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/ */
package com.cobblemon.mod.common.api.snowstorm package com.cobblemon.mod.common.api.data
import com.cobblemon.mod.common.api.codec.CodecMapped import com.cobblemon.mod.common.api.codec.CodecMapped
import com.cobblemon.mod.common.api.codec.MappedCodec import com.cobblemon.mod.common.api.codec.MappedCodec
@@ -14,6 +14,12 @@ import com.mojang.serialization.Codec
import java.lang.IllegalArgumentException import java.lang.IllegalArgumentException
import net.minecraft.network.PacketByteBuf import net.minecraft.network.PacketByteBuf
/**
* A utility class to help give Codec support for map adapted class hierarchies.
*
* @author Hiroku
* @since January 21st, 2023
*/
abstract class ArbitrarilyMappedSerializableCompanion<T : CodecMapped, K>( abstract class ArbitrarilyMappedSerializableCompanion<T : CodecMapped, K>(
val keyFromString: (String) -> K, val keyFromString: (String) -> K,
val stringFromKey: (K) -> String, val stringFromKey: (K) -> String,
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Cobblemon Contributors * Copyright (C) 2023 Cobblemon Contributors
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this

Some files were not shown because too many files have changed in this diff Show More