Skip to content

Commit

Permalink
all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jul 27, 2024
1 parent 8198ec9 commit 22f35f4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ class MappingDSL(val visitor: MappingVisitor) {
}
}

@JvmOverloads
fun c(
names: List<String?>,
@DelegatesTo(ClassDSL::class, strategy = Closure.DELEGATE_FIRST)
block: Closure<*>
block: Closure<*>? = null
) {
c(*names.toTypedArray()) {
block.delegate = this
block.call()
if (block != null) {
block.delegate = this
block.call()
}
}
}

Expand All @@ -57,14 +60,17 @@ class MappingDSL(val visitor: MappingVisitor) {
}
}

@JvmOverloads
fun f(
names: List<String?>,
@DelegatesTo(FieldDSL::class, strategy = Closure.DELEGATE_FIRST)
block: Closure<*>
block: Closure<*>? = null
) {
f(*names.toTypedArray()) {
block.delegate = this
block.call()
if (block != null) {
block.delegate = this
block.call()
}
}
}

Expand All @@ -82,14 +88,17 @@ class MappingDSL(val visitor: MappingVisitor) {
}
}

@JvmOverloads
fun m(
names: List<String?>,
@DelegatesTo(MethodDSL::class, strategy = Closure.DELEGATE_FIRST)
block: Closure<*>
block: Closure<*>? = null
) {
m(*names.toTypedArray()) {
block.delegate = this
block.call()
if (block != null) {
block.delegate = this
block.call()
}
}
}

Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions testing/1.20.4-NeoForged-Forge-Fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ unimined.minecraft {
intermediary()
yarn(1)

stub(["intermediary", "yarn"]) {
stubs(["intermediary", "yarn"]) {
c(["net/minecraft/class_1927"]) {
m(["method_55109()Lnet/minecraft/class_243;", "getPos"])
m(["method_55109;()Lnet/minecraft/class_243;", "getPos"])
}
}
}
Expand Down

0 comments on commit 22f35f4

Please sign in to comment.