Skip to content

Instantly share code, notes, and snippets.

@Josakko
Josakko / main.py
Created May 6, 2024 22:17
Minecraft comparator signal strength calculator based on inventory fullness
# https://www.reddit.com/r/Minecraft/comments/etrfs0/how_exactly_do_comparators_calculate_redstone/
class Slot:
def __init__(self, items_num=0, stack_size=64):
self.items = items_num
self.stack_size = stack_size
self.percentage = self.items / self.stack_size
class Inventory: