style: use Quaedam#resource for resource locations
This commit is contained in:
parent
bbfb3f9b9a
commit
bc64a13d9c
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import quaedam.Quaedam
|
||||
|
||||
abstract class ProjectionEffect : Cloneable {
|
||||
|
||||
@ -37,11 +38,11 @@ data class ProjectionEffectType<T : ProjectionEffect>(val constructor: () -> T)
|
||||
companion object {
|
||||
|
||||
val registryKey: ResourceKey<Registry<ProjectionEffectType<*>>> =
|
||||
ResourceKey.createRegistryKey(ResourceLocation("quaedam", "projection_effect"))
|
||||
ResourceKey.createRegistryKey(Quaedam.resource("projection_effect"))
|
||||
val registry: Registry<ProjectionEffectType<*>> = BuiltInRegistries.registerSimple(registryKey) { null }
|
||||
|
||||
val nopEffect: ProjectionEffectType<NopEffect> =
|
||||
Registry.register(registry, ResourceLocation("quaedam", "nop"), ProjectionEffectType { NopEffect })
|
||||
Registry.register(registry, Quaedam.resource("nop"), ProjectionEffectType { NopEffect })
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,14 +7,13 @@ import net.minecraft.core.BlockPos
|
||||
import net.minecraft.nbt.CompoundTag
|
||||
import net.minecraft.network.FriendlyByteBuf
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import quaedam.Quaedam
|
||||
import quaedam.utils.sendBlockUpdated
|
||||
|
||||
object SimpleProjectionUpdate {
|
||||
|
||||
val id = ResourceLocation("quaedam", "simple_projection_update")
|
||||
val id = Quaedam.resource("simple_projection_update")
|
||||
|
||||
init {
|
||||
NetworkManager.registerReceiver(NetworkManager.Side.C2S, id, ::handle)
|
||||
|
@ -72,7 +72,7 @@ data class ProjectedPersonShape(
|
||||
|
||||
object Names {
|
||||
|
||||
val id = ResourceLocation("quaedam", "projected-person-names")
|
||||
val id = Quaedam.resource("projected-person-names")
|
||||
|
||||
var names = emptySet<String>()
|
||||
|
||||
@ -109,7 +109,7 @@ data class ProjectedPersonShape(
|
||||
|
||||
object Skins {
|
||||
|
||||
val id = ResourceLocation("quaedam", "skins")
|
||||
val id = Quaedam.resource("skins")
|
||||
|
||||
var skins = emptyList<ResourceLocation>()
|
||||
|
||||
|
@ -24,8 +24,8 @@ import kotlin.jvm.optionals.getOrNull
|
||||
|
||||
object ProjectedPersonAI {
|
||||
|
||||
val tagEnemy = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation("quaedam", "projected_person/enemy"))
|
||||
val tagNoAttack = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation("quaedam", "projected_person/no_attack"))
|
||||
val tagEnemy = TagKey.create(Registries.ENTITY_TYPE, Quaedam.resource("projected_person/enemy"))
|
||||
val tagNoAttack = TagKey.create(Registries.ENTITY_TYPE, Quaedam.resource("projected_person/no_attack"))
|
||||
|
||||
val defaultSchedule = Quaedam.schedules.register("projected_person_default") {
|
||||
ScheduleBuilder(Schedule()).changeActivityAt(10, Activity.IDLE)
|
||||
|
@ -14,7 +14,7 @@ object ProjectionShell {
|
||||
|
||||
val item = Quaedam.items.register(ID) { ProjectionShellItem }!!
|
||||
|
||||
val channel = NetworkChannel.create(ResourceLocation("quaedam", ID))
|
||||
val channel = NetworkChannel.create(Quaedam.resource(ID))
|
||||
|
||||
init {
|
||||
ServerboundPSHLockAcquirePacket
|
||||
|
Loading…
Reference in New Issue
Block a user