Just Enough Items (JEI)

Just Enough Items (JEI)

391M Downloads

[1.18.1] Cheat Mode Doesn't Work on Vanilla Multiplayer (when it has been added to the server list)

sirj0k3r opened this issue ยท 27 comments

commented

Summary:
It seems JEI on Cheat Mode does not work on servers that have been saved (a.k.a present in servers.dat).

Steps to Reproduce:

With Server Saved:

  • Open a modded version of Minecraft 1.18.1 with JEI;
  • Go to Multiplayer;
  • Go to Direct Connection;
  • Enter the server's address;
  • Try it out (it should not work)
  • Disconnect;
  • Remove saved server(s);
  • Restart Minecraft;
  • Repeat (step 5 should work now)

Without Server Saved

  • Open a modded version of Minecraft 1.18.1 with JEI;
  • Go to Multiplayer;
  • Go to Direct Connection;
  • Enter the server's address;
  • Try it out (it should work)
  • Adding said server to the server list should make JEI to stop working on the server added to the list whether it's via Direct Connection or Server List

Other (might be relevant) Info:

  • Using MultiMC;
  • Using latest version of Forge as of 1/10/2022 (which is a Beta version)
commented

Check your bindings or add a new one to toggle cheat mode. I have Configurator installed and I can both enter the configuration screen and enable (and use) cheat mode as it was confirmed before.

For me, for example, I don't use Ctrl + LMB on the wrench. I only use LMB

Ah, no wonder why i wasn't able to use it. I've been so used to the old style of Ctrl+LMB. I got it to work after messing around with my keybinds for a bit, thanks.

commented

Thanks for the report!
When "it does not work", what do you see? Does JEI print an error message in the chat, or are there any logs in the server showing that the request was denied?

commented

No errors on either:

  • MultiMC's Minecraft Log;
  • Server's Console;
  • In-Game Chat;
commented

For example, do you enable cheat mode in the config file and nothing seems to happen, or do you use a hotkey to enable cheat mode and your game closes immediately, etc?

commented

Sorry, to help me understand the issue,

What exact steps do you take to "Try it out"?
and
What do you see when it does "not work"?

commented

Sorry, to help me understand the issue,

What exact steps do you take to "Try it out"? and What do you see when it does "not work"?

Sorry. I now see how vague what I wrote was...

By "try it out" I mean:

  • Enter server present in server.dat from Direct Connection or Server List;
  • Open inventory;
  • Toggle JEI (if it's hidden);
  • Toggle cheat mode (if disabled) by key or by Ctrl + click;
  • Try cheating a stack of items or a single item (should not work);

By "should not work" I mean that the item is not given to you ("you" being an op).

Game doesn't crash nor produces error logs (apparently).

commented

I tried these steps using just JEI and Forge, but never ran into the issue you described.
Do you have any other mods installed? There may be something that causes a conflict.

commented

Have you added the server to the server list?

I just replicated the following steps using MultiMC:

  • Create new instance;
  • Install Forge (latest version);
  • Install JEI;
  • Launch instance;
  • Go to Multiplayer;
  • Add server to server list;
  • Enter server from server list;
  • Toggle JEI's Cheat Mode;
  • Click a item on the JEI's overlay;

And it didn't work. No error message, no crash, no item on my inventory either.

commented

Do you get the "Gave 1 [Thingie]..." message in chat?

I just tried via (albeit Vanilla launcher, not MultiMC), did the "add server" step, entered the server, toggled cheat mode on, and it worked.

That said! Nothing appeared on the cursor, and I had to close and reopen Inventory to see the item, but I did get the "Gave" message, and the item was there.

commented

No. I didn't get the usual message when items are given.

Maybe it's a problem with MultiMC then...

It does however work just fine if the server is not added to the server list.

commented

Weird... Just tested it on Minecraft's official launcher (forge installer's instance) and the behavior is the same.

I'll try creating a new server and test it out...

commented

Just tested it out but the behavior remains the same.

server.properties is as follows:

#Minecraft server properties
#Thu Jan 13 15:50:01 WET 2022
enable-jmx-monitoring=false
rcon.port=25575
enable-command-block=false
gamemode=survival
enable-query=false
level-name=world
motd=A Minecraft Server
query.port=25565
pvp=true
difficulty=easy
network-compression-threshold=256
max-tick-time=60000
require-resource-pack=false
max-players=20
use-native-transport=true
online-mode=true
enable-status=true
allow-flight=false
broadcast-rcon-to-ops=true
view-distance=10
server-ip=
resource-pack-prompt=
allow-nether=true
server-port=25566
enable-rcon=false
sync-chunk-writes=true
op-permission-level=4
prevent-proxy-connections=false
hide-online-players=false
resource-pack=
entity-broadcast-range-percentage=100
simulation-distance=10
rcon.password=
player-idle-timeout=0
force-gamemode=false
rate-limit=0
hardcore=false
white-list=false
broadcast-console-to-ops=true
spawn-npcs=true
spawn-animals=true
function-permission-level=2
text-filtering-config=
spawn-monsters=true
enforce-whitelist=false
resource-pack-sha1=
spawn-protection=16
max-world-size=29999984
  • Default server.properties (excluding port);
  • Default Minecraft server.jar;
  • User is op.

Do you see anything that stands out?

commented

I tried on another machine and the issue still occurs.

To clarify:

Your server list must include at least one server (ideally the one you're entering), as shown in the following image:
image

commented

Does this occur on modded servers, or only on vanilla servers?
I only tried on a modded server that didn't have JEI installed.

commented

I tested on a Vanilla server. I can try testing in a modded server without JEI and I'll follow-up on that later.

commented

Does this occur on modded servers, or only on vanilla servers?
I only tried on a modded server that didn't have JEI installed.

I can confirm that on a modded server (with or without JEI) the described issue does not occur.

commented

Thanks for checking! I am able to reproduce this issue now.

Narrowing this down, it only happens when all of the following are true:

  • on Vanilla servers
  • when the player is OP but not in creative mode

I don't know if adding the server to the list matters, I have tried without the server on the list and still see the issue.

commented

Just tested it and it seems to be running just fine ๐Ÿ‘

Thanks for the hard work.

commented

I don't know if adding the server to the list matters, I have tried without the server on the list and still see the issue.

Try removing all the servers from the server list (changing servers.dat name for example to prevent data to be loss) and it should work again.

From what I've been able to test it only happens when one or more servers are present on the server list.

commented

It looks like my detection for whether the server has JEI on it is pretty broken for Vanilla servers.

Forge added a second type of connection response from vanilla servers here, that I don't handle:
MinecraftForge/MinecraftForge@2a4e05c#diff-9f879a9717c22449e79447631d472fad798068c12e4afb8ad8a47b0290ce637dR63-R64

My check only happens when:

  • checking compatibility of a server that's in the server list
  • joining a Modded server

Importantly, my check doesn't happen when joining a Vanilla server at all, it's just using whatever result it last saw from the server list, which is super incorrect.

I'll see what I can do to fix this up.

commented

I have pushed a fix for this in JEI version 9.2.3, please test it out and let me know how it goes and if you run into any other issues!

commented

Thanks for sticking with me through the rounds of questions and confirmations, this was a tricky one!

commented

I am also having this issue in my multiplayer server. I cannot use the JEI cheating function by pressing control+wrench. All it says is "Install the Configured mod to access the in-game config."
So, i installed Configured. I'm playing with a forge instillation, but on a vanilla server with just a few plugins and some client-side mods that should have zero effect on JEI. When i installed Configured, cheating still wouldn't work. I can't grab items out of of the JEI menu like normal. My server is a simple Paper server that's running vanilla only. This is very frustrating as the /give command isn't perfect. Any ideas on how to fix this? Here is an image of all the client-side mods i'm using in my server, these shouldn't be causing this. JEI cheat mode works normally for me in pure singleplayer, but it's not working in multiplayer.
Screenshot (2143)

commented

Aaaand i just noticed Mezz is working on a fix for this. I should have scrolled up to see your comment, lol. Sorry for the redundant comment.

commented

Aaaand i just noticed Mezz is working on a fix for this. I should have scrolled up to see your comment, lol. Sorry for the redundant comment.

If you install the latest beta available on Curse Forge you should see the issue go away.

commented

Aaaand i just noticed Mezz is working on a fix for this. I should have scrolled up to see your comment, lol. Sorry for the redundant comment.

If you install the latest beta available on Curse Forge you should see the issue go away.

This doesn't work. I just installed the latest beta and it's still not letting me use cheat mode.
EDIT: I just re-installed the latest version of Configured for forge, it still doesn't work. This is something Mezz needs to fix.

commented

Check your bindings or add a new one to toggle cheat mode.
I have Configurator installed and I can both enter the configuration screen and enable (and use) cheat mode as it was confirmed before.

For me, for example, I don't use Ctrl + LMB on the wrench. I only use LMB