Skip to content

Commit

Permalink
add to todo
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Nov 14, 2023
1 parent 3e57a28 commit 4571181
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ yes, this is possible, see [PrcraftExampleMod](https://github.com/prcraft-minecr
* forge datagen
* fabric datagen
* quilt datagen
* fix yarn on neoforge (these will probably be agents, possibly in separate projects and pulled like JarModAgent)
* inject remapper into ASMAPI
* reflection remapper (also for forge potentially, or in general).


## Recommended Setup
1. take one of the versions from [testing](./testing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import xyz.wagyourtail.unimined.internal.mapping.extension.mixin.hard.HardTarget
import xyz.wagyourtail.unimined.internal.mapping.extension.mixin.refmap.BaseMixinRefmap
import xyz.wagyourtail.unimined.internal.mapping.extension.mixin.refmap.RefmapBuilderClassVisitor
import xyz.wagyourtail.unimined.internal.mapping.extension.mixinextra.MixinExtra
import xyz.wagyourtail.unimined.util.DefaultMap
import xyz.wagyourtail.unimined.util.FinalizeOnRead
import xyz.wagyourtail.unimined.util.defaultedMapOf
import java.nio.file.FileSystem
Expand Down Expand Up @@ -113,7 +114,7 @@ class MixinRemapExtension(

open class MixinTarget(override val inputTag: InputTag, val extension: MixinRemapExtension) : InputTagExtension {
protected val metadata: MergedMetadata = MergedMetadata(extension)
protected val tasks: MutableMap<Int, Deque<(CommonData) -> Unit>> = defaultedMapOf { ConcurrentLinkedDeque() }
protected val tasks: DefaultMap<Int, Deque<(CommonData) -> Unit>> = defaultedMapOf { ConcurrentLinkedDeque() }

fun addMetadata(metadata: MixinMetadata) {
this.metadata.addMetadata(metadata)
Expand Down Expand Up @@ -144,7 +145,7 @@ class MixinRemapExtension(
)
extension.modifyHardRemapper(visitor)
synchronized(tasks) {
tasks[mrjVersion]!!.add(visitor::runRemap)
tasks[mrjVersion].add(visitor::runRemap)
}
visitor
} else {
Expand All @@ -159,7 +160,7 @@ class MixinRemapExtension(
extension.logger.info("[HardTarget] processing state for ${environment.mrjVersion}")
val data = CommonData(environment, extension.logger)
try {
for (task in tasks[environment.mrjVersion]!!) {
for (task in tasks[environment.mrjVersion]) {
task(data)
}
} catch (e: Exception) {
Expand Down

0 comments on commit 4571181

Please sign in to comment.