how can i determine the face by which a block can emit a redstone signal?

Started by Alvieris2002@g… on

Topic category: Help with modding (Java Edition)

Last seen on 20:09, 15. Aug 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how can i determine the face by which a block can emit a redstone signal?
Thu, 11/11/2021 - 13:39 (edited)

Hello, very good, I have a question, I want to know how I can determine the face through which the redstone signal should come out, for example I try to make a block like the vanilla repeater of minecraft I have the model and the code ready, I just want the block to only I can send the redstone signal through the EAST / front side only but I don't know how to do it, this is the code that is responsible for determining the signal intensity

@Override
public int getWeakPower (BlockState blockstate, IBlockReader blockAccess, BlockPos pos, Direction side) {
return 15;
}

Is there a way that in the return I can return more values like the face for which the signal should come out?

Edited by Alvieris2002@gmail.com on Thu, 11/11/2021 - 13:39