cushion facing fix
This commit is contained in:
@@ -127,6 +127,11 @@ As of **4.0.15**, the tested seating behavior for chairs, sofas, benches, cushio
|
|||||||
|
|
||||||
## Release History
|
## Release History
|
||||||
|
|
||||||
|
### 4.0.17 — Standalone Cushion facing
|
||||||
|
|
||||||
|
- Standalone Cushion now captures the player's horizontal facing when sitting, matching Dining Bench behavior.
|
||||||
|
- Sitting on a Cushion from opposite directions now produces the corresponding seating direction instead of using the previous free-rotation/fixed initial yaw behavior.
|
||||||
|
|
||||||
### 4.0.15 — Dining Bench facing
|
### 4.0.15 — Dining Bench facing
|
||||||
|
|
||||||
- Dining Bench captures the player's horizontal facing when sitting.
|
- Dining Bench captures the player's horizontal facing when sitting.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
|
||||||
mod_version=4.0.16
|
mod_version=4.0.17
|
||||||
maven_group=earth.terrarium.handcrafted
|
maven_group=earth.terrarium.handcrafted
|
||||||
archives_base_name=handcrafted
|
archives_base_name=handcrafted
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,11 @@ public class CushionBlock extends Block implements SittableBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) {
|
protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) {
|
||||||
this.sitOn(level, pos, player, null);
|
// A standalone cushion has no backrest, so match Dining Bench behavior:
|
||||||
|
// use the player's horizontal facing at the moment of sitting. This lets
|
||||||
|
// the cushion be approached and used naturally from any side instead of
|
||||||
|
// always starting the Seat with one fixed/free-rotation world yaw.
|
||||||
|
this.sitOn(level, pos, player, player.getDirection());
|
||||||
return InteractionResult.SUCCESS;
|
return InteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user