mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-30 20:29:19 +00:00
Apply some suggestions
This commit is contained in:
@@ -28,6 +28,7 @@ package org.geysermc.geyser.entity;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
@@ -41,6 +42,7 @@ import java.util.Objects;
|
||||
|
||||
@Getter
|
||||
@Accessors(fluent = true)
|
||||
@ToString
|
||||
public class BedrockEntityDefinition implements GeyserEntityDefinition {
|
||||
private final @NonNull Identifier identifier;
|
||||
private final @NonNull GeyserEntityProperties registeredProperties;
|
||||
@@ -101,5 +103,4 @@ public class BedrockEntityDefinition implements GeyserEntityDefinition {
|
||||
return new BedrockEntityDefinition(identifier, propertiesBuilder != null ? propertiesBuilder.build() : new GeyserEntityProperties());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ final class BedrockMovePlayer {
|
||||
|
||||
// Ignore movement packets until Bedrock's position matches the teleported position
|
||||
if (session.getUnconfirmedTeleport() != null) {
|
||||
session.confirmTeleport(packet.getPosition().sub(0, VanillaEntities.PLAYER_ENTITY_OFFSET, 0));
|
||||
session.confirmTeleport(packet.getPosition().down(VanillaEntities.PLAYER_ENTITY_OFFSET));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ final class BedrockMovePlayer {
|
||||
// Therefore, we're fixing this by allowing player to no clip to clip through the floor, not only this fixed the issue but
|
||||
// player y velocity should match java perfectly, much better than teleport player right down :)
|
||||
// Shouldn't mess with anything because beyond this point there is nothing to collide and not even entities since they're prob dead.
|
||||
if (packet.getPosition().getY() - VanillaEntities.PLAYER_ENTITY_OFFSET< session.getBedrockDimension().minY() - 5) {
|
||||
if (packet.getPosition().getY() - VanillaEntities.PLAYER_ENTITY_OFFSET < session.getBedrockDimension().minY() - 5) {
|
||||
// Ensuring that we still can collide with collidable entity that are also in the void (eg: boat, shulker)
|
||||
boolean possibleOnGround = false;
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ public final class EntityUtils {
|
||||
}
|
||||
}
|
||||
} else if (mountDefinition.is(BuiltinEntityType.HAPPY_GHAST)) {
|
||||
int seatingIndex = Math.min(index, 4);
|
||||
int seatingIndex = Math.min(index, 3);
|
||||
xOffset = HappyGhastEntity.X_OFFSETS[seatingIndex];
|
||||
yOffset = 3.4f;
|
||||
zOffset = HappyGhastEntity.Z_OFFSETS[seatingIndex];
|
||||
|
||||
Reference in New Issue
Block a user