Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I would like my mod to support vanilla clients when running on a server, as much as possible. I know that the following work:

  • The server will accept connections from vanilla clients if I set acceptableRemoteVersions = "*"
  • If I add a recipe, the client will not see a preview of the result, but they can still shift-click the output box and perform the recipe. I'm OK with this.
  • I saw items with the default model (purple/black box) while playing on a server using a vanilla client. So I know that in some cases the vanilla client will use this when it doesn't know how to render an item (but I don't know the details).

When I naively tried to connect to a server with my mod, I found out:

  • The vanilla client will crash if the server sends it an unknown item id.

I am wondering if I can get the server to substitute a vanilla item when it sends packets to a vanilla client; ie the server will know the player is holding mymod:item, but it will check if the client is vanilla, and if so it will tell the client the player is holding minecraft:dirt. Is there any hook I could use to accomplish this, or another approach?

 

See https://github.com/stewbasic/CommandItem if more specifics are needed.

Hmmm, that is a tricky situation.

 

One approach might be to use an item stack NBT on a stack of a vanilla item. I am not sure but suspect that the client would tolerate getting NBT data that it doesn't care about.

 

The hard part then is that the item will actually be the vanilla item (with NBT) on the server, so you'll have to intercept a bunch of events for interaction with the item, etc. where you would check the NBT to see if it is your special item.

 

For clients that actually have the mod installed, then you'd have to intercept the rendering of the item to show it properly.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.