1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-05 23:10:30 +00:00

Don't propagate adjacent redstone signals for computers (#549)

Minecraft propagates "strong" redstone signals (such as those directly
from comparators or repeaters) through solid blocks. This includes
computers, which is a little annoying as it means one cannot feed
redstone wire from one side and a repeater from another.

This changes computers to not propagate strong redstone signals, in the
same way transparent blocks like glass do.

Closes #548.
This commit is contained in:
Jonathan Coates 2020-10-04 11:14:22 +01:00 committed by GitHub
parent 84036d97d9
commit 8472112fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.storage.loot.LootContext;
@ -180,4 +181,10 @@ public abstract class BlockComputerBase<T extends TileComputerBase> extends Bloc
if( label != null ) computer.setLabel( label );
}
}
@Override
public boolean shouldCheckWeakPower( BlockState state, IWorldReader world, BlockPos pos, Direction side )
{
return false;
}
}