Skip to content

Commit

Permalink
Change identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi-reden committed Feb 17, 2024
1 parent de38a16 commit 8ff53fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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<PlayerEntityComponent> = ComponentRegistry.getOrCreate(PlayerEXDCApi.createID("player_entities"), PlayerEntityComponent::class.java)
val livingEntities: ComponentKey<LivingEntityComponent> = 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() }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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>, Component {
class LivingEntityComponent() : PlayerComponent<Component>, Component {
companion object {}

private val attributes = mutableMapOf<PlayerEXDCAttributes, Int>()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"custom": {
"cardinal-components": [
"playerex-directors-cut:player_entities"
"playerex-directors-cut:living_entities"
]
}
}

0 comments on commit 8ff53fb

Please sign in to comment.