repo for my hex addons :3
0
fork

Configure Feed

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

cheat at modfest

+48 -3
src/client/resources/assets/mica/textures/block/rune_add.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_defer.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_div.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_double.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_doublecast.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_foreach.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_mul.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_player_literal.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_reveal.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_sub.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_tone_indicator.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_twice.png

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_void.png

This is a binary file and will not be displayed.

+26 -1
src/main/scala/org/net/eu/pool/mica/Defs.scala
··· 33 33 import dev.onyxstudios.cca.api.v3.world.WorldComponentFactoryRegistry 34 34 // ]]>) 35 35 36 + given [T] => (reg: RegistryKey[? <: Registry[T]]) => Conversion[Identifier, RegistryKey[T]] = id => RegistryKey.of(reg, id) 37 + given [T]: Conversion[RegistryKey[T], Identifier] = _.getRegistry 38 + 36 39 /** 37 40 * Holds a deferred promise to add a value to a registry. This is returned by e.g. [[cursedRegister]] for you to call in your init function. 38 41 * ··· 285 288 b.setZ(b.getZ + 1) 286 289 val h = RuneShift(q.getX, q.getY, q.getZ, context.getSide) 287 290 given ref: RuneRef = RuneRef(b, h) 288 - if ref.isEmpty && ref.neighbors.forall(_.isEmpty) then 291 + if Rune.this != EmptyRune && ref.isEmpty && ref.neighbors.forall(_.isEmpty) then 289 292 ref.rune = Rune.this 290 293 try 291 294 println(s"Loading placed NBT") ··· 322 325 override def read(rhs: List[(Rune, RuneRef)])(using RuneRef, World): (Data, List[(Rune, RuneRef)]) = ((), rhs) 323 326 override def execute(remainder: Unit, frame: BoxedThunk): BoxedThunk = execute(frame) 324 327 def execute(frame: BoxedThunk): BoxedThunk 328 + 329 + sealed trait AnyRegistryKey: 330 + type T 331 + val key: RegistryKey[T] 332 + def registry: Registry[T] = Registries.REGISTRIES.get(key.getRegistry).asInstanceOf[Registry[T]] 333 + def value: Any = key.getValue 334 + object AnyRegistryKey: 335 + def apply[T](key: RegistryKey[T]): AnyRegistryKey = 336 + type _T = T 337 + val _key = key 338 + new AnyRegistryKey: 339 + override type T = _T 340 + override val key: RegistryKey[T] = _key 341 + def apply[T](key: Identifier)(using RegistryKey[? <: Registry[T]]): AnyRegistryKey = apply(key: RegistryKey[T]) 342 + given Codec[AnyRegistryKey] = Identifier.CODEC.dispatch("registry", _.key.getRegistry, RegistryKey.createCodec(_).fieldOf("value").xmap(AnyRegistryKey(_), _.key.asInstanceOf[RegistryKey[Object]])) 343 + 344 + given [T]: RegistryKey[? <: Registry[T]] = Registries.REGISTRIES.getKey.asInstanceOf[RegistryKey[? <: Registry[T]]] 345 + 346 + @register("registry_key") 347 + given ValueType[AnyRegistryKey]: 348 + override def eq[U: ValueType as v](x: AnyRegistryKey, y: U): Boolean = v.cast[AnyRegistryKey](y).contains(x) 349 + override def show(x: AnyRegistryKey): Text = Text.translatable(x.key.toTranslationKey(x.key.getRegistry.toShortTranslationKey)).withColor(0x2dccfc) 325 350 326 351 /** 327 352 * Holder object for [[Rune! Rune]] registries and common values of [[Rune.surfaceSprite]].
+22 -2
src/main/scala/org/net/eu/pool/mica/Mica.scala
··· 25 25 import net.minecraft.util.shape.VoxelShapes 26 26 import net.minecraft.world.World.ExplosionSourceType 27 27 import org.net.eu.pool.mica 28 + import org.net.eu.pool.mica.VoidRune.Frame 28 29 import org.slf4j.{Logger, LoggerFactory} 29 30 import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable 30 31 ··· 534 535 Some(asInstanceOf[BoxedThunk { val tag: to.type; }]) 535 536 else 536 537 None 538 + def accept[T: ValueType](value: T) = tag.accept(data, value) 537 539 object BoxedThunk: 538 540 inline def unapply[T](box: BoxedThunk): Option[(? <: Singleton & ThunkFrame { type Data = T; }, T)] = 539 541 ??? ··· 789 791 override def eq[U: ValueType as v](x: (Rune, RuneRef), y: U): Boolean = v.cast[(Rune, RuneRef)](y).exists(y => x._1 eq y._1) 790 792 override def show(x: (Rune, RuneRef)): Text = Text.literal(registryFor[Rune].getId(x._1).toTranslationKey("mica.runes")) 791 793 792 - @register("fatboy_slim") 794 + @register("tone_indicator") 793 795 object PosLiteral extends Rune: 794 796 override type Data = RuneRef 795 797 override def read(rhs: List[(Rune, RuneRef)])(using ref: RuneRef, world: World): (RuneRef, List[(Rune, RuneRef)]) = (ref, rhs) ··· 1329 1331 x.x =~ y.x && x.y =~ y.y && x.z =~ y.z 1330 1332 override def cast[R: ClassTag](x: Vec3d): Option[R] = super.cast(x) 1331 1333 1332 - override def show(x: Vec3d): Text = Text.literal(s"{${x.x}, ${x.y}, ${x.z}}") 1334 + override def show(x: Vec3d): Text = Text.literal(s"{${x.x}, ${x.y}, ${x.z}}").styled(_.withColor(0xad8d1a)) 1333 1335 1334 1336 inline def codec[T: Codec as c] = c 1335 1337 ··· 1354 1356 given `hey did you know attributes are values`: ValueType[AttributeReference]: 1355 1357 override def eq[U: ValueType as v](x: AttributeReference, y: U): Boolean = v.cast[AttributeReference](y).exists(y => (x.uuid == y.uuid) && (x.attribute eq y.target)) 1356 1358 override def show(x: AttributeReference): Text = Text.translatable(x.attribute.getTranslationKey).styled(_.withColor(0x07b891)) 1359 + 1360 + @register("void") 1361 + object VoidRune extends SimpleRune: 1362 + @register("void/0") 1363 + object Frame extends ThunkFrame: 1364 + override type Data = BoxedThunk 1365 + override def accept[T: ValueType](data: BoxedThunk, value: T): BoxedThunk = data 1366 + override def execute(frame: BoxedThunk): BoxedThunk = BoxedThunk(Frame, frame) 1367 + register { item.register() } 1368 + 1369 + @register("twice") 1370 + object TwiceRune extends SimpleRune: 1371 + @register("twice/0") 1372 + object Frame extends ThunkFrame: 1373 + override type Data = BoxedThunk 1374 + override def accept[T: ValueType](data: BoxedThunk, value: T): BoxedThunk = data.accept(value).accept(value) 1375 + override def execute(frame: BoxedThunk): BoxedThunk = BoxedThunk(Frame, frame) 1376 + register { item.register() } 1357 1377 1358 1378 @register("nyaboom") 1359 1379 object ExplosionRune extends BinaryRune: