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

Since I am using a translator, my English may be unnatural.
I'm trying a certain block now. It uses onBlockActivated to fix the pose and coordinates of the player who right-clicked on the block. I thought the vanilla bed code might be helpful, but I couldn't find it. It would be helpful if someone could tell me.

  • 4 weeks later...
  • Author

Looking at #setPose, It was running dataManager.set, but I'm not sure what this is doing. #set doesn't seem to be doing anything about the player's pose.

  • Author

 

I'm sorry, I made a mistake. Looking at it, I found that I was doing something about pose with recalculateSize. I'll think about it for a moment.

  • Author

Where is the behavior when the player gets on the entity? Probably done in different classes, but I can't find all. Can anyone tell me? (Specifically, I'm trying to perform the action of sitting on a chair with onBlockActivated, but for some reason the pose is STANDING in startRiding and there is no pose called RIDING. Also, when sitting, shift I don't know how to get off at.)

Oh, so you are trying to do a block you can sit on. The animation for sitting when the player mounts on a rideable entity is handled in the LivingRenderer class, take a look there. You will see you won't have to use setPose at all. You would need to set the rider of the dummy entity you use to simulate sitting on a block to the player that right clicks on that block, then the rest is already taken care for you in the background. Take a look at how vanilla rideable entities handle mount/dismount

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

  • Author

I know that some famous mod chair blocks use mountable entities for sitting, but after this I do the same (eg right click to dance on that block). I'm planning to make a block (such as), so I want to make the code versatile. Therefore, if possible, I would like to refer to bedtime rather than riding on an entity, but the bedtime code is complicated and confusing (due to skipping time, dimming the screen, etc.).

It is now possible to teleport to the block position with setPotision by referring to the bed and riding code,

・ I can't stay there
・ I don't know how to get off when I press shift
I have these problems. I'll take a look at Living Renderer from now on.

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.