repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

imprecise

-10
-10
project/hexic/src/main/scala/org/eu/net/pool/hexic/views.scala
··· 103 103 if w.getPath != "overworld" then c.put("w", w.getPath) 104 104 c.putLong("p", pos.asLong) 105 105 c 106 - class OfExactEntity(entity: => Entity)(using ServerWorld) extends InventoryView(typeOfExactEntity): 107 - override val viewType = typeOfExactEntity 108 - override def entities(using TransactionContext) = Set(entity) 109 - override def serialize = 110 - val c = super.serialize 111 - // TODO 112 - c 113 106 def deserialize(data: NbtCompound)(using ServerWorld): Option[InventoryView] = for 114 107 id <- Option(Identifier.tryParse(data.getString("id"))) 115 108 viewType <- Option(InventoryView.registry.get(id)) ··· 135 128 key = RegistryKey.of(RegistryKeys.WORLD, Identifier.of(namespace, path)) 136 129 given ServerWorld <- Option(summon[ServerWorld].getServer.getWorld(key)) 137 130 yield OfBlock(pos) 138 - private given typeOfExactEntity: InventoryView.Type[OfExactEntity]: 139 - override def deserialize(data: NbtCompound)(using ServerWorld): Option[OfExactEntity] = ??? 140 131 registry("sum") = typeOfSum 141 132 registry("entity") = typeOfEntity 142 133 registry("block") = typeOfBlock 143 - registry("exact") = typeOfExactEntity 144 134 Events.forBlock.register: (pos, state) => 145 135 val storage = ItemStorage.SIDED.find(summon, pos, null): Storage[ItemVariant] 146 136 if storage == null then Seq()