-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how we disable copycats from being diagonalized so that it now…
… covers all the types with one simple mixin
- Loading branch information
1 parent
bdd6724
commit 185d005
Showing
7 changed files
with
29 additions
and
38 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
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
22 changes: 22 additions & 0 deletions
22
...ava/com/copycatsplus/copycats/mixin/compat/diagonalblocks/DiagonalBlockTypeImplMixin.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.copycatsplus.copycats.mixin.compat.diagonalblocks; | ||
|
||
import com.copycatsplus.copycats.compat.Mods; | ||
import com.copycatsplus.copycats.foundation.annotation.ModMixin; | ||
import com.copycatsplus.copycats.foundation.copycat.ICopycatBlock; | ||
import fuzs.diagonalblocks.api.v2.impl.DiagonalBlockTypeImpl; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.block.Block; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@ModMixin(requiredMods = {Mods.DIAGONAL_WALLS, Mods.DIAGONAL_FENCES, Mods.DIAGONAL_WINDOWS}) | ||
@Mixin(DiagonalBlockTypeImpl.class) | ||
public class DiagonalBlockTypeImplMixin { | ||
|
||
@Inject(method = "isTarget", at = @At("HEAD"), cancellable = true) | ||
private void copycats$disableDiagonalCopycats(ResourceLocation resourceLocation, Block block, CallbackInfoReturnable<Boolean> cir) { | ||
if (block instanceof ICopycatBlock) cir.setReturnValue(false); | ||
} | ||
} |
36 changes: 0 additions & 36 deletions
36
.../src/main/java/com/copycatsplus/copycats/mixin/compat/diagonalfences/FenceBlockMixin.java
This file was deleted.
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