Guide: Logic Gates

Started by NorthWestTrees on

Topic category: User side tutorials

Guide: Logic Gates
Mon, 04/28/2025 - 20:24 (edited)

Procedure Blocks

You can make the primary logic gates using just a few blocks.

  1. Logic operator: The light blue operator with the = sign
  2. NOT block: this is used to invert the gate: AND to NAND, OR to NOR, and XOR to XNOR gates; 
    It can also invert a logic value; if it's true, it will return as false.

Logic Gates

AND Gate:

Input A     Input B     Output    
False False False
False True False
True False False
True True True

OR Gate:

Input A     Input B     Output    
False False False
False True True
True False True
True True True

XOR Gate:

Input A     Input B     Output    
False False False
False True True
True False True
True True False

NAND Gate:

Input A     Input B     Output    
False False True
False True True
True False True
True True False

NOR Gate:

Input A     Input B     Output    
False False True
False True False
True False False
True True False

XNOR Gate:

Input A     Input B     Output    
False False True
False True False
True False False
True True True

NOT Block:

Input     Output    
False True
True False

Default Logic:

Input     Output    
False False
True True

Logic Gate Chart:

Download Chart: https://github.com/MCreator-Examples/.github/blob/main/images/charts/logic_gates.png

A chart of logic gates!

Procedure Example

Procedure example of gates

Tutorials

  • Coming Soon!

Conclusion

Using logic gates can open up many possibilities when creating more advanced conditions for your MCreator projects. The most commonly used gates are AND and OR, but there are plenty of scenarios where other gates become incredibly useful. 

For example, a NOR gate can be used to test if both outputs are false, while an XNOR gate is helpful when checking if two things are both in the same state (either both on or both off).

I hope this post has sparked some new ideas for your mods and helped expand your approach to designing better procedures for your future projects. Happy modding, guys!

Edited by NorthWestTrees on Mon, 04/28/2025 - 20:24