diff --git a/src/main/kotlin/com/edelweiss/playerex/PlayerEXDCEntityComponents.kt b/src/main/kotlin/com/edelweiss/playerex/PlayerEXDCEntityComponents.kt index 94ddb587..ca3087d7 100644 --- a/src/main/kotlin/com/edelweiss/playerex/PlayerEXDCEntityComponents.kt +++ b/src/main/kotlin/com/edelweiss/playerex/PlayerEXDCEntityComponents.kt @@ -1,15 +1,16 @@ package com.edelweiss.playerex import com.edelweiss.playerex.api.PlayerEXDCApi -import com.edelweiss.playerex.components.PlayerEntityComponent +import com.edelweiss.playerex.components.LivingEntityComponent import dev.onyxstudios.cca.api.v3.component.ComponentKey import dev.onyxstudios.cca.api.v3.component.ComponentRegistry import dev.onyxstudios.cca.api.v3.entity.EntityComponentFactoryRegistry import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer +import net.minecraft.entity.LivingEntity class PlayerEXDCEntityComponents : EntityComponentInitializer { - val playerEntities: ComponentKey = ComponentRegistry.getOrCreate(PlayerEXDCApi.createID("player_entities"), PlayerEntityComponent::class.java) + val livingEntities: ComponentKey = ComponentRegistry.getOrCreate(PlayerEXDCApi.createID("living_entities"), LivingEntityComponent::class.java) override fun registerEntityComponentFactories(registry: EntityComponentFactoryRegistry) { - registry.registerForPlayers(playerEntities) { PlayerEntityComponent() } + registry.registerFor(LivingEntity::class.java, livingEntities) { LivingEntityComponent() } } } \ No newline at end of file diff --git a/src/main/kotlin/com/edelweiss/playerex/components/LivingEntityComponent.kt b/src/main/kotlin/com/edelweiss/playerex/components/LivingEntityComponent.kt index be64eae6..fdd32a63 100644 --- a/src/main/kotlin/com/edelweiss/playerex/components/LivingEntityComponent.kt +++ b/src/main/kotlin/com/edelweiss/playerex/components/LivingEntityComponent.kt @@ -5,7 +5,7 @@ import dev.onyxstudios.cca.api.v3.component.Component import dev.onyxstudios.cca.api.v3.entity.PlayerComponent import net.minecraft.nbt.NbtCompound -class PlayerEntityComponent() : PlayerComponent, Component { +class LivingEntityComponent() : PlayerComponent, Component { companion object {} private val attributes = mutableMapOf() diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index d3f3a557..846cf478 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -56,7 +56,7 @@ }, "custom": { "cardinal-components": [ - "playerex-directors-cut:player_entities" + "playerex-directors-cut:living_entities" ] } } \ No newline at end of file