• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Martomate / Hexacraft / 7351367576

28 Dec 2023 06:50PM UTC coverage: 51.185% (-0.1%) from 51.312%
7351367576

push

github

Martomate
Refactor: Made Chunk not know if it has been saved to file

9 of 12 new or added lines in 2 files covered. (75.0%)

110 existing lines in 32 files now uncovered.

2829 of 5527 relevant lines covered (51.19%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/game/src/main/scala/hexacraft/world/entity/registry.scala
1
package hexacraft.world.entity
2

3
import hexacraft.world.CylinderSize
4

5
import com.martomate.nbt.Nbt
6
import hexacraft.world.coord.CylCoords
7

8
trait EntityFactory:
9
  def atStartPos(pos: CylCoords)(using CylinderSize): Entity
10

11
  def fromNBT(tag: Nbt.MapTag)(using CylinderSize): Entity
12

13
trait EntityRegistry {
14
  def get(name: String): Option[EntityFactory]
15
}
16

UNCOV
17
object EntityRegistry {
×
18
  def empty: EntityRegistry = _ => None
19

1✔
20
  def from(mappings: Map[String, EntityFactory]): EntityRegistry = name => mappings.get(name)
21
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc