Java Code Examples for net.minecraft.world.World#isReceivingRedstonePower()

The following examples show how to use net.minecraft.world.World#isReceivingRedstonePower() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DispenserBlock_qcMixin.java    From fabric-carpet with MIT License 5 votes vote down vote up
@Redirect(method = "neighborUpdate", at = @At(
        value = "INVOKE",
        target =  "Lnet/minecraft/world/World;isReceivingRedstonePower(Lnet/minecraft/util/math/BlockPos;)Z",
        ordinal = 1
))
private boolean checkUpPower(World world, BlockPos blockPos_1)
{
    if (!CarpetSettings.quasiConnectivity)
        return false;
    return world.isReceivingRedstonePower(blockPos_1);
}
 
Example 2
Source File: TntBlockMixin.java    From fabric-carpet with MIT License 4 votes vote down vote up
@Redirect(method = "onBlockAdded", at = @At(value = "INVOKE",
        target = "Lnet/minecraft/world/World;isReceivingRedstonePower(Lnet/minecraft/util/math/BlockPos;)Z"))
private boolean isTNTDoNotUpdate(World world, BlockPos blockPos)
{
    return !CarpetSettings.tntDoNotUpdate && world.isReceivingRedstonePower(blockPos);
}