Skip to content

Commit

Permalink
Actually register block
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Jul 10, 2024
1 parent c08ca4e commit 61ccf3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kotlin_version=1.9.24
fabric_kotlin_version=1.10.20

# Mod Properties
mod_version=1.0.0
mod_version=1.0.1

maven_group=net.mcbrawls.entities
mod_id=brawls-entities
Expand Down
10 changes: 9 additions & 1 deletion src/main/kotlin/net/mcbrawls/entities/BrawlsAPIEntities.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
package net.mcbrawls.entities

import eu.pb4.polymer.core.api.entity.PolymerEntityUtils
import net.mcbrawls.entities.entity.DisplayedBlockEntity
import net.minecraft.entity.Entity
import net.minecraft.entity.EntityType
import net.minecraft.entity.SpawnGroup
import net.minecraft.registry.Registries
import net.minecraft.registry.Registry
import net.minecraft.util.Identifier

object BrawlsAPIEntities {

val DISPLAYED_BLOCK = register(
"displayed_block",
EntityType.Builder.create(::DisplayedBlockEntity, SpawnGroup.MISC)
.dimensions(0.0f, 0.0f)
.maxTrackingRange(2)
.trackingTickInterval(10)
)

fun <E : Entity> register(id: String, builder: EntityType.Builder<E>): EntityType<E> {
val identifier = Identifier.of("brawls", id)
Expand Down

0 comments on commit 61ccf3a

Please sign in to comment.