I Can't Place Modded Blocks on my Minecraft Server
Solution 1:
The reason you can't place modded blocks is because your server isn't modded. You've placed the mods where a modded server could find them, but that's Server Modding Step #2 and you never did Server Modding Step #1: install Forge. Forge is the most important mod, since it is what allows a server to use other mods at all.
What you're seeing, is your client and your server having this conversation:
Client: I'm going to place a block now!
Server: OK! Hit me with it!
Client: There's my block! By the way, I am showing it to my player ahead of time to make the graphics run smoothly without block lag, so let me know when you've got the block placed too.
Server: OK! Oh wait, I have no idea what that is! I will make it air, OK?
Client: Oh, OK! I will make it air too. I'm taking away the block and showing my player air now. Are we cool?
Server: We are cool! Now what do you want to do next?
Your client and server are cooperating to make sure that what you see and what exists on the server are always in sync. Since the server is responsible for storing the world, it gets final say over what exists. Your modded client can try all it wants to place mod blocks, but the unmodded server will always "correct" your client and tell it that, sorry, that thing doesn't exist.
Fix this by modding your server
To fix this, you need to
- mod your server
- copy the mods to your server (this is Step #2 that you've already done)
- copy your mods' configuration files to the server (missing this can also make it impossible to place blocks!)
1. Mod your server
Figure out what version of Forge you have installed and go get the same-version installer from the Forge file download page. You want the link called "Installer" that matches your version.
Now run this, and from the window that pops up choose "server". This will result in a modded server .jar file that you now need to put wherever your server's normal, unmodded .jar file is living right now. (Depending on your host, you might need to rename the new .jar to match the old one, or tell a dashboard the name of the new one.) Restart your server now and make sure it comes up clean.
Congrats, you've modded the server! It now has the built-in ability to load and understand mods.
2. Copy your mods to the server
Your server needs to have an exact copy of the mods your client has, except for any mods that are client-only. For example, Optifine, MAtmos, minimap mods, and the like should never be installed on a server. (Note: Modern versions of Forge no longer need this careful separation, and now will just ignore client-side mods.)
Copy all the rest to the server's mods/
folder; you already know how that part works.
3. Copy the config files to the server
Mods use configuration files to know which options are enabled and how their blocks are stored in the world save. Any mismatch here between client and server can result in mods simply not working, mods crashing the server, or placed blocks turning into completely different blocks.
Find your config files, and place them into the server's config/
folder exactly the same way they are in your client’s files. This process mirrors how you copy your mods into the server's files.
You're done! (Re)launch your server, make sure it comes up without errors or crashes and with a lot of messages about loading your mods, and then connect with your modded client.