Skip to content

Commit

Permalink
Fixed block affecting runes
Browse files Browse the repository at this point in the history
  • Loading branch information
stuin committed Jul 3, 2021
1 parent 0bd27bd commit 03a95ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public BlockTeleportBlock() {

@Override
protected boolean onActivate(World world, BlockPos pos, BlockPos duct, Entity entity, PlayerEntity player) {
Direction flipped = flipside(world, pos);
BlockPos destination = DuctUtil.locateSink(world, duct, pos.offset(flipped));
BlockPos destination = DuctUtil.locateSink(world, duct, pos);
if (destination != null) {
return true;
} else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ protected Box getTargetBox(BlockPos pos, Direction flipped, int tier) {
private boolean runOnce(World world, BlockPos pos, BlockPos duct, PlayerEntity player, Direction flipped, int tier) {
//For all entities on platform
for(Entity entity : world.getEntitiesByClass(Entity.class, getTargetBox(pos, flipped, tier), null)) {
if(onActivate(world, pos, duct, entity, player))
if(onActivate(world, pos.offset(flipped), duct, entity, player))
return true;
}
return onActivate(world, pos, duct, null, player);
return onActivate(world, pos.offset(flipped), duct, null, player);
}

public BlockPos getDuct(World world, BlockPos pos) {
Expand Down

0 comments on commit 03a95ad

Please sign in to comment.