Wen Li Posted May 28, 2023 Posted May 28, 2023 I have a block and its blockentity. When player click the block, blockentity will provide menu to player. But I want to make only one player can open GUI at the same time. How to do it? Quote
warjort Posted May 28, 2023 Posted May 28, 2023 (edited) Show what you have tried and what problems you have. With reproducable code for your problem on github. This is a support forum not a learn modding forum. We help you fix problems after you have tried to figure it out for yourself. We don't write or design your mod for you. If I was going to do something like that, I would investigate how ChestBlockEntity uses ContainerOpenersCounter to track whether it should render the lid as open. i.e. how many players have the container open. Then modify the logic for your usecase. Edited May 28, 2023 by warjort Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.