Jump to content

How to have custom items appear clientside, while playing on a vanilla server?


Recommended Posts

Posted

I'm working on a simple mod that allows you to craft custom doors, you have a door frame and can insert both sticks and planks to alter the appearance. You also get charred and bleached wood, which gives it more color variation. I will save the custom items locally, while letting the Server think it is dealing with regular items. For example, if I craft charred wood, I now have 2 different items, normal planks and charred planks in my inventory, and I want the Server to think they are just 2 different stacks of planks. I have figured out how to make the crafting work, by simply giving the input and output the same amounts of material and letting the Server think I simply cancellec a crafting request, but what I don't know is how to trick the server in the first place. I think, to put it differently, how do I send false information to a Server?

Posted

I mentioned it, I'm planning to store the locations of the custom items locally, and simply testing, whenever I get a block-update, or if I change chunks, if the block is still there. Something similar is done with drops and items in my inventory. The items will get lost if put into a foreign inventory, but that doesn't matter in that case, because the blocks are cheaply made, and you can still customize the default doors. I have solved most of these issues, my only problem in that department is actually just how to craft the blocks without changing the crafting ingredients. (For example charred wood by putting wood and flint and steel in a table, and leaving the flint and steel in the grid. The server would not see a difference, and would not know if I actually crafted or just cancelled the crafting). I have also looked up the Minecraft TCP Protocols, and I know what I need to send to the Server to trick it, I just don't know how to block the standard outgoing transmissions, and how to send the fake requests upon my events. (I'm not sure how to access the established channel from the outside, Mods and Plugins use a separate Channel to communicate with Servers, and I need access to the "Vanilla Protocols")

Posted

Thank you, this is exactly what I needed! I'll test it first with a simple mod that will only "change" 1 block on a server, to see if it is possible to trick a server in the given timeframe of 1 tick, and to alter the packets without it causing issues/the server noticing. You seem to really know your stuff, though, so I'll trust your judgement and keep it small for now, to not have invested too much time into something that isn't likely to succeed.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.