repo for my hex addons :3
0
fork

Configure Feed

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

add more rune textures; try getting mod to build

+23 -7
+10 -1
build.gradle.kts
··· 174 174 } 175 175 } 176 176 177 + val mergedDeps by configurations.creating 178 + 177 179 dependencies { 178 180 // To change the versions see the gradle.properties file 179 181 minecraft("com.mojang:minecraft:$minecraft_version") 180 182 mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2") 181 183 modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}") 184 + 182 185 include(modImplementation("net.fabricmc:fabric-language-scala:${project.properties["scala_loader_version"]}")!!) 183 186 include(modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}+$minecraft_version")!!) 184 187 include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:$cca_version")!!) 185 188 include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-world:$cca_version")!!) 186 - include(modImplementation("io.github.0x3c50.renderer:renderer-fabric:2.1.2")!!) 189 + //include(modImplementation("io.github.0x3c50.renderer:renderer-fabric:2.1.2")!!) 190 + mergedDeps(provider { "org.scala-lang:scala3-library_3:${scala.scalaVersion.get()}" }) 191 + include(provider { "org.scala-lang:scala3-library_3:${scala.scalaVersion.get()}" }) 187 192 //include(modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-item:$cca_version")!!) 188 193 } 189 194 ··· 242 247 vmArg("-XX:+FlightRecorder") 243 248 programArgs("--username", "PoolloverNathan") 244 249 } 250 + } 251 + 252 + tasks.named<Jar>("jar") { 253 + from(mergedDeps.resolve()) 245 254 } 246 255 247 256 tasks.withType<ProcessResources> {
+1 -1
gradle.properties
··· 17 17 kotlin_loader_version=1.13.4+kotlin.2.2.0 18 18 scala_loader_version=0.3.1.11 19 19 # Mod Properties 20 - mod_version=0.0.1 20 + mod_version=0.0.2 21 21 maven_group=org.net.eu.pool.mica 22 22 archives_base_name=mica 23 23 # Dependencies
src/client/resources/assets/mica/textures/block/rune_arrow_east.png

This is a binary file and will not be displayed.

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

This is a binary file and will not be displayed.

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

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_arrow_west.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_endquote.png

This is a binary file and will not be displayed.

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

This is a binary file and will not be displayed.

src/client/resources/assets/mica/textures/block/rune_nyaboom.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_teleport.png

This is a binary file and will not be displayed.

+6
src/client/scala/org/net/eu/pool/mica/client/MicaClient.scala
··· 24 24 import net.minecraft.text.Text 25 25 import net.minecraft.util.math.Direction.Axis 26 26 27 + import java.nio.file.{Files, Path} 27 28 import java.util.Optional 28 29 import java.util.function.Consumer 29 30 import scala.util.chaining.scalaUtilChainingOps ··· 245 246 }) 246 247 } 247 248 ) 249 + val projectRoot = System.getenv("PROJECT_ROOT") 250 + if projectRoot != null then 251 + val texture = rune.spriteTexture 252 + val textureFile = Path.of(s"$projectRoot/src/client/resources/assets/${texture.getNamespace}/textures/${texture.getPath}.png") 253 + if !Files.exists(textureFile) then Files.createFile(textureFile) 248 254 249 255 def datagen(using gen: FabricDataGenerator): Unit = 250 256 given pack: FabricDataGenerator#Pack = gen.createPack()
+1 -1
src/main/scala/org/net/eu/pool/mica/mixin/FlintAndSteelItemMixin.java
··· 11 11 12 12 @Mixin(FlintAndSteelItem.class) 13 13 public class FlintAndSteelItemMixin { 14 - @Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true) 14 + @Inject(method = {"useOnBlock", "method_7884"}, at = @At("HEAD"), cancellable = true) 15 15 void startRunes(ItemUsageContext context, CallbackInfoReturnable<ActionResult> cir) { 16 16 JackBlack$.MODULE$.flintAndSTEEL_$bang$bang(cir, context); 17 17 }
+5 -4
src/main/scala/org/net/eu/pool/mica/mixin/ItemMixin.java
··· 11 11 import org.spongepowered.asm.mixin.Mixin; 12 12 import org.spongepowered.asm.mixin.Shadow; 13 13 import org.spongepowered.asm.mixin.injection.At; 14 + import org.spongepowered.asm.mixin.injection.Group; 14 15 import org.spongepowered.asm.mixin.injection.Inject; 15 16 import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 16 17 17 18 @Mixin(net.minecraft.item.Item.class) 18 - public class ItemMixin { 19 - @Shadow @Final private RegistryEntry.Reference<Item> registryEntry; 19 + public abstract class ItemMixin { 20 + @Shadow @Deprecated public abstract RegistryEntry.Reference<Item> getRegistryEntry(); 20 21 21 - @Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true) 22 + @Inject(method = {"useOnBlock", "method_7884"}, at = @At("HEAD"), cancellable = true, remap = false) 22 23 void useOnBlock(ItemUsageContext context, CallbackInfoReturnable<ActionResult> cir) { 23 - if (registryEntry.isIn(ItemTags.PICKAXES)) { 24 + if (getRegistryEntry().isIn(ItemTags.PICKAXES)) { 24 25 JackBlack$.MODULE$.pickaxe(cir, context); 25 26 } 26 27 }