Vanilla-Style Bed

Started by CupcakesForAngels on

Topic category: Help with modding (Java Edition)

Last seen on 05:13, 9. Nov 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Vanilla-Style Bed

Hello!

I'm working on a mod and one of the features I wanted to add was the ability for the player to sleep anywhere without using an item or manually placing a block. Basically roughing it on the floor.

I've seen this tutorial: https://www.youtube.com/watch?v=Sr66hlk5q10

However it seems like that uses it's own method to skip the night, with a timer and such for others to get to bed instead of waiting for a certain number of players to sleep or anything like that, and it seems to have no animation. Doing that would be fairly simple since it's just setting TOD but it does not really cover what I wanted to offer.

I was curious if there is an vanilla/forge function that can be called to mimic a vanilla bed, or, failing that, if it's possible to have an invisible/unbreakable vanilla bed appear and be used. Any direction of either solution would be appreciated. 

 I understand Java scripting and trying to move away from code blocks (takes a bit to get used to the structure of MC) so the solution does not need to be in code blocks, if there is one.