OR and AND Gates

Started by Goldorion on

Topic category: Help with MCreator software

OR and AND Gates

Hello,

I just know what is the AND and OR Gates in the Logic Operations in the Procedure Section.

 

Can you explain me please ?

 

Goldorion

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
They are logic gates used in…
Sun, 07/15/2018 - 06:08

They are logic gates used in MCreator, scratch, any type of programming and maths.

OR means that one of the two "things" (well, I'm not English so I don't know how to call them) should be true, but it works if both of them are true too.

AND means that both of the "things" should be true

 

Examples:

 

If (has item in player inventory = tnt) OR (has item in player inventory = fire_charge)

do explode

 

This way when the player has a tnt, a fire charge or both of them in his inventory, he explodes.

 

If ( is thundering) AND (has player item in inventory = fire_charge)

Strike lightning

Remove 1 item from player inventory (fire_charge)

 

This way, if the weather is lightning and you have a fire charge in the inventory, the fire charge will be removed and you will strike a lightning

If the weather is not lightning or if you don't have fire charge in your inventory you won't do any lighting

 

I hope it helped

(Sorry for bad English)

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nice They are also used for…
Sat, 02/08/2020 - 06:17

Nice

They are also used for redstone