Bed obstruction checks are unlike Minecraft #785
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#785
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In MineClone 2 you cannot use a bed that does not have two air blocks above it. This greatly limits what people can build. It is for example not possible to build usable bunk beds, and it is impossible to have a usable bed in a house that is not 3 blocks tall on the inside. This annoying limitation does not exist in Minecraft.
I will attempt to make a fix for this later, which clones the Minecraft behavior as described here on the Minecraft wiki:
If we speak about beds I'd like to add a reference to Wuzzy/MineClone2#765 as well. Btw I almost realized how it works but unsure for myself, to start fixing it or better wait for more eperienced developer
Yeah, 2 block-tall houses should be fine for beds. I ended up digging a 2x1 hole in the floor and place the bed in it, so I can keep my house the height I built it initially. It makes the bed look a bit weird, but at least I could use it after that. I hope this will be tweaked.
I dont upvote for the moment only for the reason that I saw many bugs in original java-version of MC in many versions, when you stand up from the bed without as much space around: eg. find your head in stone block, or you cant move unless dont break something, or you teleport 3-4 nodes away from your bed, etc... So I supposed the limitations of Minetest/Mineclone2 aren't as bad if we want to avoid some bugs by design... But of course it would be not bad, if it would ever possible
@kay27 if you want to have a go at fixing this you can go ahead. I haven't even started yet myself and haven't worked on beds before. But please let me know if you decide against doing it, so I can attempt to solve it then.
The reason why I added the restriction because I wanted to avoid that the player gets stuck with the head inside a solid node when leaving the bed and suffocating.
This restriction could be lifted if the checks you describe are applied.
You may want to take a look at Minecraft's latest snapshot, which came with an improvement to how players are placed from beds (tries to place them around).
I think it might be safely done right now for all cases but respawn. During respawn you suppose to appear right in the bed, awaken. And it happens like 1:51:20 in this video if you'd take a look: https://youtu.be/KP_a_i-Qk-g
The easiest I can do is to set spawn point not to bed but to the place you stayed before going to sleep.
Here I had a clear path to my bed, I got as close as possible to the block that I placed my bed on, but it looks like it didn't like that I was not on the same level as the bed.
I don't know why you have to be extremely close to the bed, when this looks close enough to be able to use it. What could the drawbacks possibly be that you have to be restricted from sleeping if you're not closer?
Fixed all listed above
7bbb7438ae
Please feel free to write if find something's wrong, for reopening
@kay27 it says your spawn bed is missing or blocked and respawns at world spawn if there isn't a bed at your spawn point (which there isn't if spawn point != bed pos)
@anon5 not exactly but thanks for reminding, I should check it too. World spawn point choice is important but its also important not to awake having the head in ceiling blocks and minimal height of 2 nodes for bed is important too. Actually Im not sure its a big problem to respawn at the same place when the bed is destroyed. Dont you know any minors excepting wiki mismatch? Place can become dangerous, right?
@anon5:
Waiting for your further feedback thankfully,
daede2a183
With the new checks I respawned on the roof of hut with a 2 block high interior.
I think MineClone 2 should implement the same checks as mc.
I don't know it. According official MC wiki it searches by x and z axises but almost nothing said about y. But... you know what I mean: we can't just ignore it, if there is some space upper or lower that the bed position why not to take it? So my current algorithm just unspins the spiral from the center (where the bed placed) and for every x/z pair chechs the y availability in a sequence: 0, +1, -1, +2, -2, +3, -3, +4, -4. The sequence is defined here and can be easily changed: https://git.minetest.land/Wuzzy/MineClone2/src/branch/master/mods/PLAYER/mcl_spawn/init.lua#L128
So if we shrink it for eg. just set to
{0, 1, -1, 2, -2}
it will hopefully avoid teleporting you to the roof but may cause another problem as geting you out of the house :(I really appreciate you feedback (thank you so much for it!) but still don't know what is the best way of searches. Hope you do? :) How MC handles the altitude? What I should change?
@anon5 I tested beds in Minecraft 1.16.2.
They behave not as described in wiki.
If you surround the bed by some blocks, just one layer, you appear at the world spawn point and find you personal spawn point erased even if you 'undig' the bed back - you'll need to click it again to set as respawn point back.
So 7 blocks from wiki seem to be outdated or wrong information... And it's no prob to repeat Minecraft's behavior... But we shouldn't just copy Minecraft, I'm thinking what to do
Let's please continue here: Wuzzy/MineClone2#833