That makes a whole lot of sense, thanks for the detailed explanation! I ended up getting data to pass from the entity to the screen via the menuprovider, however its not like what you described. I'm going to try it on a server and see what happens.
Essentially when I make a new menuprovider I have it saved to another menuprovider object before i return it
example:
EntityClass:
public static myCustomMenu ref;
public getEntity(){
return this;
}
public myCustomMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) {
ref = new myCustomMenu(windowId, playerInventory, null);
ref.setEntity(getEntity());
//reference whats in the menu here
return ref;
}
So the screen really only reads variables from the menu class, which is created by client or server and talks to the entity? And you can't access the screen because its under a registry?
I think I'm starting to get it, thanks for the help agian!