-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump baseline handler, trapdoor handler, and simple piston handler im…
…plemented. Redstone mixins implemented for powering blocks on bump. Implemented Ground Pound. Moved collision-related action transitions to PostMove.
- Loading branch information
1 parent
af1a736
commit 6ffeae1
Showing
27 changed files
with
547 additions
and
87 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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/floralquafloral/mixin/RedstoneViewMixin.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,24 @@ | ||
package com.floralquafloral.mixin; | ||
|
||
import com.floralquafloral.bumping.handlers.BaselineBumpingHandler; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.Direction; | ||
import net.minecraft.world.RedstoneView; | ||
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; | ||
|
||
@Mixin(RedstoneView.class) | ||
public interface RedstoneViewMixin { | ||
@Inject(method = "isReceivingRedstonePower", at = @At("HEAD"), cancellable = true) | ||
private void forceReceiveRedstonePower(BlockPos pos, CallbackInfoReturnable<Boolean> cir) { | ||
if(BaselineBumpingHandler.FORCED_SIGNALS.contains(pos)) cir.setReturnValue(true); | ||
} | ||
|
||
@Inject(method = "getEmittedRedstonePower(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I", at = @At("HEAD"), cancellable = true) | ||
private void forceReceiveRedstonePowerBravo(BlockPos pos, Direction direction, CallbackInfoReturnable<Integer> cir) { | ||
if(BaselineBumpingHandler.FORCED_SIGNALS.contains(pos.offset(direction.getOpposite()))) | ||
cir.setReturnValue(1); | ||
} | ||
} |
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
Oops, something went wrong.