mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-04 15:31:36 +00:00
Merge branch 'master' into api/2.9.1
This commit is contained in:
@@ -261,7 +261,7 @@ public interface GeyserConfig {
|
||||
Please note: if the cooldown is enabled, some users may see a black box during the cooldown sequence, like below:
|
||||
https://geysermc.org/img/external/cooldown_indicator.png
|
||||
This can be disabled by going into Bedrock settings under the accessibility tab and setting "Text Background Opacity" to 0
|
||||
This setting can be set to "title", "actionbar" or "false\"""")
|
||||
This setting can be set to "title", "actionbar" or "disabled\"""")
|
||||
default CooldownUtils.CooldownType showCooldown() {
|
||||
return CooldownUtils.CooldownType.TITLE;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.AddPlayerPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.MovePlayerPacket;
|
||||
import org.geysermc.geyser.entity.EntityDefinition;
|
||||
import org.geysermc.geyser.entity.EntityDefinitions;
|
||||
import org.geysermc.geyser.entity.type.LivingEntity;
|
||||
import org.geysermc.geyser.level.block.Blocks;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
@@ -317,8 +318,7 @@ public class AvatarEntity extends LivingEntity {
|
||||
|
||||
if (pose == Pose.SWIMMING) {
|
||||
// This is just for, so we know if player is swimming or crawling.
|
||||
// TODO test, changed from position (field) to position() (method), which adds offset
|
||||
if (session.getGeyser().getWorldManager().blockAt(session, position.toInt()).is(Blocks.WATER)) {
|
||||
if (session.getGeyser().getWorldManager().blockAt(session, position.down(EntityDefinitions.PLAYER.offset()).toInt()).is(Blocks.WATER)) {
|
||||
setFlag(EntityFlag.SWIMMING, true);
|
||||
} else {
|
||||
setFlag(EntityFlag.CRAWLING, true);
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||
import org.geysermc.geyser.translator.protocol.Translator;
|
||||
import org.geysermc.geyser.util.CooldownUtils;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerState;
|
||||
@@ -185,7 +186,14 @@ public final class BedrockPlayerAuthInputTranslator extends PacketTranslator<Pla
|
||||
|
||||
// The player will calculate the "desired" pose at the end of every tick, if this pose still invalid then
|
||||
// it will consider the smaller pose, but we don't need to calculate that, we can go off what the client sent us.
|
||||
entity.setPose(entity.getDesiredPose());
|
||||
// Also set the session pose directly and set the metadata directly since we don't want setPose method inside entity to change
|
||||
// the current entity flag again.
|
||||
final Pose pose = entity.getDesiredPose();
|
||||
if (pose != session.getPose()) {
|
||||
session.setPose(pose);
|
||||
entity.setDimensionsFromPose(session.getPose());
|
||||
entity.updateBedrockMetadata();
|
||||
}
|
||||
|
||||
// Vehicle input is send before player movement
|
||||
processVehicleInput(session, packet, wasJumping);
|
||||
|
||||
Reference in New Issue
Block a user