I'm making a tech mod which will have several machines with a circuit slot (like GregTech) which is controlled by an int called circuitNumber which is apart of a ContainerData variable in the BlockEntity. This int will control the amount of an ItemStack in a slot of my custom circuit item.
I tried modifying the data through the passed-in blockEntity in the menu class. (The #setCircuit and #getCircuit functions just used ContainerData#set and ContainerData#get using the passed-in ContainerData in the menu class) No dice, the data never gets changed.
I then tried to make a packed called CircuitSyncC2SPacket which would tell the server to modify the data using a function in the BlockEntity class. Zilch, no effect whatsoever.
I couldn't find anything when searching for this online, and the one I did was from 2013 that said to use Packets. If this is the solution, then I must be doing something wrong. Any help would be appreciated, thank you. The project's GitHub.