repo for my hex addons :3
0
fork

Configure Feed

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

merger

+58 -9
+3
.gitmodules
··· 1 1 [submodule "vendor/kubo"] 2 2 path = vendor/kubo 3 3 url = https://github.com/ipfs/kubo 4 + [submodule "vendor/hexcellular"] 5 + path = vendor/hexcellular 6 + url = https://github.com/poollovernathan/hexcellular
+1 -2
build.gradle.kts
··· 144 144 "dev.onyxstudios") 145 145 exactRepo("https://maven.pool.net.eu.org/", 146 146 "dev.kineticcat.hexportation", 147 - "miyucomics.hexcellular", 148 147 "miyucomics.hexical", 149 148 "miyucomics.overevaluate", 150 149 "org.eu.net.pool", ··· 469 468 n++ 470 469 } else if (page is MutableMap<*, *>) { 471 470 page as MutableMap<Any, Any> 472 - for (key in listOf("text", "title")) { 471 + for (key in listOf("text", "title", "header")) { 473 472 val text = page[key] 474 473 if (text != null && text is String) { 475 474 entries["text.hexic.book.${n}"] = text
+2
settings.gradle.kts
··· 12 12 } 13 13 } 14 14 } 15 + 16 + includeBuild("vendor/hexcellular")
+4 -2
src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/addon/hexic/lists2.json
··· 63 63 }, 64 64 { 65 65 "type": "hexcasting:pattern", 66 + "header": "Exterior Distillation", 66 67 "op_id": "hexcasting:mul", 67 68 "anchor": "hexcasting:mul", 68 69 "input": "[a], [b]", ··· 71 72 }, 72 73 { 73 74 "type": "hexcasting:pattern", 74 - "op_id": "hexcasting:mul", 75 - "anchor": "hexcasting:mul", 75 + "header": "Interior Distillation", 76 + "op_id": "hexcasting:div", 77 + "anchor": "hexcasting:div", 76 78 "input": "[a], [b]", 77 79 "output": "[[a, b]]", 78 80 "text": "Calculates the inner product of two lists. If the two lists were arranged side-by-side, the resulting list has one entry for every row (unpaired elements are skipped)."
+15 -1
src/main/scala/org/eu/net/pool/hexic/Hexic.scala
··· 1927 1927 Patterns.mkConstAction(2): 1928 1928 case Seq(ary: ListIota, nr: DoubleIota) => 1929 1929 val ls = ary.getList.toSeq 1930 - val n = iotaInt(nr, throw MishapInvalidIota.ofType(nr, 0, "int")) 1930 + val n = iotaInt(nr, under = ls.size, throw MishapInvalidIota.of(nr, 0, "int.positive.less", ls.size)) 1931 1931 Seq(ListIota(ls take n), ListIota(ls drop (n+1)), ls(n)) 1932 1932 case Seq(ary: ListIota, nr) => throw MishapInvalidIota.ofType(nr, 0, "int") 1933 1933 case Seq(ary, _) => throw MishapInvalidIota.ofType(ary, 1, "list") ··· 2131 2131 else 2132 2132 i 2133 2133 case _ => er 2134 + @targetName("iotaInt max") 2135 + def iotaInt(iota: Iota, max: Int, er: => Nothing): Int = 2136 + val x = iotaInt(iota, er) 2137 + if x > max then 2138 + er 2139 + else 2140 + x 2141 + @targetName("iotaInt under") 2142 + def iotaInt(iota: Iota, under: Int, er: => Nothing): Int = 2143 + val x = iotaInt(iota, er) 2144 + if x >= under then 2145 + er 2146 + else 2147 + x 2134 2148 2135 2149 extension [T, R] (f: T => R) def ∘ [U](g: U => T) = (x: U) => f(g(x)) 2136 2150 def wrapReturn[T](body: (T => Nothing) => T): T = body(return _)
+6 -3
src/main/scala/org/eu/net/pool/hexic/mixin/EntityMixin.java
··· 1 1 package org.eu.net.pool.hexic.mixin; 2 2 3 3 import net.minecraft.entity.Entity; 4 + import net.minecraft.entity.LivingEntity; 4 5 import net.minecraft.entity.damage.DamageSource; 5 6 import net.minecraft.entity.damage.DamageSources; 6 7 import net.minecraft.entity.player.PlayerEntity; ··· 28 29 @Shadow private World world; 29 30 30 31 @Shadow protected abstract void tickInVoid(); 32 + @Shadow public abstract void remove(Entity.RemovalReason reason); 33 + 34 + @Shadow public abstract void discard(); 31 35 32 36 @Shadow public abstract boolean damage(DamageSource source, float amount); 33 - 34 - @Shadow public abstract Vec3d getPos(); 35 37 36 38 @Inject(at = @At("TAIL"), method = {"attemptTickInVoid", "method_31473"}, cancellable = true) 37 39 void attemptTickInVoidBlocks(CallbackInfo ci) { ··· 39 41 if (!((Object) this instanceof PlayerEntity p && (p.isCreative() || p.isSpectator()))) { 40 42 var id = getWorld().getRegistryKey().getValue(); 41 43 if (id.getNamespace().equals("hexic") && id.getPath().startsWith("fresh-") && (box.minX < 0 || box.minY < 0 || box.minZ < 0 || box.maxX > 11 || box.maxY > 11 || box.maxZ > 11)) { 42 - damage(getWorld().getDamageSources().outOfWorld(), Float.MAX_VALUE); 44 + damage(getWorld().getDamageSources().outsideBorder(), Float.MAX_VALUE); 45 + remove(Entity.RemovalReason.KILLED); 43 46 ci.cancel(); 44 47 return; 45 48 }
+27 -1
src/main/scala/org/eu/net/pool/hexic/mixin/WorldMixin.java
··· 1 1 package org.eu.net.pool.hexic.mixin; 2 2 3 + import net.fabricmc.loader.api.FabricLoader; 4 + import net.minecraft.registry.DynamicRegistryManager; 5 + import net.minecraft.registry.RegistryKey; 6 + import net.minecraft.registry.RegistryKeys; 7 + import net.minecraft.util.Identifier; 8 + import net.minecraft.util.math.BlockPos; 9 + import net.minecraft.util.math.ChunkPos; 3 10 import net.minecraft.world.World; 11 + import net.minecraft.world.biome.source.BiomeAccess; 12 + import net.minecraft.world.chunk.Chunk; 13 + import net.minecraft.world.chunk.ChunkStatus; 14 + import net.minecraft.world.chunk.EmptyChunk; 4 15 import org.eu.net.pool.hexic.Extern; 5 16 import org.spongepowered.asm.mixin.Mixin; 17 + import org.spongepowered.asm.mixin.Shadow; 6 18 import org.spongepowered.asm.mixin.injection.At; 7 19 import org.spongepowered.asm.mixin.injection.Inject; 8 20 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 21 + import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 9 22 import scala.ref.ReferenceQueue; 10 23 import scala.ref.WeakReference; 11 24 12 25 @Mixin(World.class) 13 - public class WorldMixin { 26 + public abstract class WorldMixin { 27 + @Shadow public abstract RegistryKey<World> getRegistryKey(); 28 + 29 + @Shadow public abstract DynamicRegistryManager getRegistryManager(); 30 + 31 + @Shadow public abstract BiomeAccess getBiomeAccess(); 32 + 14 33 @Inject(at = @At("TAIL"), method = "<init>") 15 34 void postConstruct(CallbackInfo ci) { 16 35 Extern.worlds().$plus$eq(new WeakReference(this)); 36 + } 37 + 38 + @Inject(at = @At("HEAD"), method = "getChunk(IILnet/minecraft/world/chunk/ChunkStatus;Z)Lnet/minecraft/world/chunk/Chunk;", cancellable = true) 39 + void preGetChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create, CallbackInfoReturnable<Chunk> cir) { 40 + if (getRegistryKey().getValue().getNamespace().equals("hexic") && getRegistryKey().getValue().getPath().startsWith("fresh-") && (chunkX != 0 || chunkZ != 0)) { 41 + cir.setReturnValue(new EmptyChunk((World) (Object) this, new ChunkPos(chunkX, chunkZ), getRegistryManager().get(RegistryKeys.BIOME).getEntry(RegistryKey.of(RegistryKeys.BIOME, Identifier.of("minecraft", "the_void"))).get())); 42 + } 17 43 } 18 44 }