-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from NotStirred/1.20.4_dasm2
Pre-compute dasm TargetClass and redirects before applying any mixins Switch to dasm 2, update all annotations
- Loading branch information
Showing
15 changed files
with
561 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,8 @@ forge*changelog.txt | |
|
||
# Fabric | ||
.fabric | ||
.mixin.out | ||
.mixin.out | ||
|
||
# Dasm | ||
.dasm.out | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 18 additions & 15 deletions
33
src/main/java/io/github/opencubicchunks/cubicchunks/mixin/CubeAccessAndDescendantsSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,56 @@ | ||
package io.github.opencubicchunks.cubicchunks.mixin; | ||
|
||
import io.github.notstirred.dasm.api.annotations.redirect.redirects.FieldRedirect; | ||
import io.github.notstirred.dasm.api.annotations.redirect.redirects.MethodRedirect; | ||
import io.github.notstirred.dasm.api.annotations.redirect.redirects.TypeRedirect; | ||
import io.github.notstirred.dasm.api.annotations.redirect.sets.RedirectSet; | ||
import io.github.notstirred.dasm.api.annotations.selector.FieldSig; | ||
import io.github.notstirred.dasm.api.annotations.selector.MethodSig; | ||
import io.github.notstirred.dasm.api.annotations.selector.Ref; | ||
import io.github.opencubicchunks.cubicchunks.world.level.chunklike.CloPos; | ||
import io.github.opencubicchunks.cubicchunks.world.level.cube.CubeAccess; | ||
import io.github.opencubicchunks.cubicchunks.world.level.cube.ImposterProtoCube; | ||
import io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube; | ||
import io.github.opencubicchunks.cubicchunks.world.level.cube.ProtoCube; | ||
import io.github.opencubicchunks.dasm.api.Ref; | ||
import io.github.opencubicchunks.dasm.api.redirect.DasmRedirectSet; | ||
import io.github.opencubicchunks.dasm.api.redirect.FieldRedirect; | ||
import io.github.opencubicchunks.dasm.api.redirect.MethodRedirect; | ||
import io.github.opencubicchunks.dasm.api.redirect.TypeRedirect; | ||
import net.minecraft.world.level.ChunkPos; | ||
import net.minecraft.world.level.chunk.ChunkAccess; | ||
import net.minecraft.world.level.chunk.ImposterProtoChunk; | ||
import net.minecraft.world.level.chunk.LevelChunk; | ||
import net.minecraft.world.level.chunk.ProtoChunk; | ||
|
||
@DasmRedirectSet | ||
@RedirectSet | ||
public interface CubeAccessAndDescendantsSet extends GeneralSet { | ||
@TypeRedirect(from = @Ref(ChunkAccess.class), to = @Ref(CubeAccess.class)) | ||
abstract class ChunkAccessToCubeAccessRedirects { | ||
@FieldRedirect("cloPos") protected ChunkPos chunkPos; | ||
abstract class ChunkAccess_to_CubeAccess_redirects { | ||
@FieldRedirect(@FieldSig(type = @Ref(ChunkPos.class), name = "chunkPos")) protected CloPos cloPos; | ||
|
||
@MethodRedirect("cc_getCloPos") public native ChunkPos getPos(); | ||
@MethodRedirect(@MethodSig("getPos()Lnet/minecraft/world/level/ChunkPos;")) public native CloPos cc_getCloPos(); | ||
} | ||
|
||
@TypeRedirect(from = @Ref(LevelChunk.class), to = @Ref(LevelCube.class)) | ||
abstract class LevelChunkToLevelCubeRedirects { } | ||
abstract class LevelChunk_to_LevelCube_redirects { } | ||
|
||
@TypeRedirect( | ||
from = @Ref(string = "net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity"), | ||
to = @Ref(string = "io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube$BoundTickingBlockEntity") | ||
) | ||
abstract class LevelChunk$BoundTickingBlockEntityToLevelCube$BoundTickingBlockEntityRedirects { } | ||
abstract class LevelChunk$BoundTickingBlockEntity_to_LevelCube$BoundTickingBlockEntity_redirects { } | ||
|
||
@TypeRedirect( | ||
from = @Ref(string = "net.minecraft.world.level.chunk.LevelChunk$PostLoadProcessor"), | ||
to = @Ref(string = "io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube$PostLoadProcessor") | ||
) | ||
abstract class LevelChunk$PostLoadProcessorToLevelCube$PostLoadProcessorRedirects { } | ||
abstract class LevelChunk$PostLoadProcessor_to_LevelCube$PostLoadProcessor_redirects { } | ||
|
||
@TypeRedirect( | ||
from = @Ref(string = "net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper"), | ||
to = @Ref(string = "io.github.opencubicchunks.cubicchunks.world.level.cube.LevelCube$RebindableTickingBlockEntityWrapper") | ||
) | ||
abstract class LevelChunk$RebindableTickingBlockEntityWrapperToLevelCube$RebindableTickingBlockEntityWrapperRedirects { } | ||
abstract class LevelChunk$RebindableTickingBlockEntityWrapper_to_LevelCube$RebindableTickingBlockEntityWrapper_redirects { } | ||
|
||
@TypeRedirect(from = @Ref(ProtoChunk.class), to = @Ref(ProtoCube.class)) | ||
abstract class ProtoChunkToProtoCubeRedirects { } | ||
abstract class ProtoChunk_to_ProtoCube_redirects { } | ||
|
||
@TypeRedirect(from = @Ref(ImposterProtoChunk.class), to = @Ref(ImposterProtoCube.class)) | ||
abstract class ImposterProtoChunkToImposterProtoCubeRedirects { } | ||
abstract class ImposterProtoChunk_to_ImposterProtoCube_redirects { } | ||
} |
Oops, something went wrong.