-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rule:
reIntroduceTrapdoorUpdateSkipping
- Loading branch information
Showing
4 changed files
with
31 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
src/main/java/carpetfixes/mixins/reIntroduced/RedstoneWireBlock_skipperMixin.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 carpetfixes.mixins.reIntroduced; | ||
|
||
import carpetfixes.CFSettings; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import net.minecraft.block.RedstoneWireBlock; | ||
import net.minecraft.block.TrapdoorBlock; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
|
||
@Mixin(RedstoneWireBlock.class) | ||
public class RedstoneWireBlock_skipperMixin { | ||
|
||
@WrapOperation( | ||
method = "getRenderConnectionType(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;" + | ||
"Lnet/minecraft/util/math/Direction;Z)Lnet/minecraft/block/enums/WireConnection;", | ||
constant = @Constant(classValue = TrapdoorBlock.class) | ||
) | ||
private boolean trapdoorUpdateSkipping(Object obj, Operation<Boolean> original) { | ||
return !CFSettings.reIntroduceTrapdoorUpdateSkipping && original.call(obj); | ||
} | ||
} |
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