Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Clean up some TODOs
Dieser Commit ist enthalten in:
Ursprung
915ad2d057
Commit
fe254380dc
@ -299,7 +299,7 @@ public class Entity {
|
|||||||
}
|
}
|
||||||
} else if (session.getPlayerEntity().getEntityId() == entityId && !metadata.getFlags().getFlag(EntityFlag.SNEAKING) && metadata.getFlags().getFlag(EntityFlag.BLOCKING)) {
|
} else if (session.getPlayerEntity().getEntityId() == entityId && !metadata.getFlags().getFlag(EntityFlag.SNEAKING) && metadata.getFlags().getFlag(EntityFlag.BLOCKING)) {
|
||||||
metadata.getFlags().setFlag(EntityFlag.BLOCKING, false);
|
metadata.getFlags().setFlag(EntityFlag.BLOCKING, false);
|
||||||
metadata.getFlags().setFlag(EntityFlag.IS_AVOIDING_BLOCK, true); //TODO: CHECK
|
metadata.getFlags().setFlag(EntityFlag.IS_AVOIDING_BLOCK, true);
|
||||||
ClientPlayerActionPacket releaseItemPacket = new ClientPlayerActionPacket(PlayerAction.RELEASE_USE_ITEM, new Position(0, 0, 0), BlockFace.DOWN);
|
ClientPlayerActionPacket releaseItemPacket = new ClientPlayerActionPacket(PlayerAction.RELEASE_USE_ITEM, new Position(0, 0, 0), BlockFace.DOWN);
|
||||||
session.sendDownstreamPacket(releaseItemPacket);
|
session.sendDownstreamPacket(releaseItemPacket);
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ public class Entity {
|
|||||||
if (entityMetadata.getValue().equals(Pose.SLEEPING)) {
|
if (entityMetadata.getValue().equals(Pose.SLEEPING)) {
|
||||||
metadata.getFlags().setFlag(EntityFlag.SLEEPING, true);
|
metadata.getFlags().setFlag(EntityFlag.SLEEPING, true);
|
||||||
// Has to be a byte or it does not work
|
// Has to be a byte or it does not work
|
||||||
metadata.put(EntityData.PLAYER_FLAGS, (byte) 2); //TODO: CHECK
|
metadata.put(EntityData.PLAYER_FLAGS, (byte) 2);
|
||||||
if (entityId == session.getPlayerEntity().getEntityId()) {
|
if (entityId == session.getPlayerEntity().getEntityId()) {
|
||||||
Vector3i lastInteractionPos = session.getLastInteractionPosition();
|
Vector3i lastInteractionPos = session.getLastInteractionPosition();
|
||||||
metadata.put(EntityData.BED_POSITION, lastInteractionPos);
|
metadata.put(EntityData.BED_POSITION, lastInteractionPos);
|
||||||
|
@ -63,8 +63,6 @@ public class FishingHookEntity extends Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO Is ID 8 needed?
|
|
||||||
|
|
||||||
super.updateBedrockMetadata(entityMetadata, session);
|
super.updateBedrockMetadata(entityMetadata, session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class PaintingEntity extends Entity {
|
|||||||
AddPaintingPacket addPaintingPacket = new AddPaintingPacket();
|
AddPaintingPacket addPaintingPacket = new AddPaintingPacket();
|
||||||
addPaintingPacket.setUniqueEntityId(geyserId);
|
addPaintingPacket.setUniqueEntityId(geyserId);
|
||||||
addPaintingPacket.setRuntimeEntityId(geyserId);
|
addPaintingPacket.setRuntimeEntityId(geyserId);
|
||||||
addPaintingPacket.setMotive(paintingName.getBedrockName()); //TODO: This is what it's called now?
|
addPaintingPacket.setMotive(paintingName.getBedrockName());
|
||||||
addPaintingPacket.setPosition(fixOffset(true));
|
addPaintingPacket.setPosition(fixOffset(true));
|
||||||
addPaintingPacket.setDirection(direction);
|
addPaintingPacket.setDirection(direction);
|
||||||
session.sendUpstreamPacket(addPaintingPacket);
|
session.sendUpstreamPacket(addPaintingPacket);
|
||||||
|
@ -43,7 +43,7 @@ public class EndermanEntity extends MonsterEntity {
|
|||||||
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
|
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
|
||||||
// Held block
|
// Held block
|
||||||
if (entityMetadata.getId() == 15) {
|
if (entityMetadata.getId() == 15) {
|
||||||
metadata.put(EntityData.DISPLAY_ITEM, BlockTranslator.getBedrockBlockId((int) entityMetadata.getValue())); //TODO: Check
|
metadata.put(EntityData.CARRIED_BLOCK, BlockTranslator.getBedrockBlockId((int) entityMetadata.getValue()));
|
||||||
}
|
}
|
||||||
// 'Angry' - mouth open
|
// 'Angry' - mouth open
|
||||||
if (entityMetadata.getId() == 16) {
|
if (entityMetadata.getId() == 16) {
|
||||||
|
@ -151,10 +151,10 @@ public enum EntityType {
|
|||||||
PANDA(PandaEntity.class, 113, 1.25f, 1.125f, 1.825f),
|
PANDA(PandaEntity.class, 113, 1.25f, 1.125f, 1.825f),
|
||||||
FOX(FoxEntity.class, 121, 0.5f, 1.25f),
|
FOX(FoxEntity.class, 121, 0.5f, 1.25f),
|
||||||
BEE(BeeEntity.class, 122, 0.6f, 0.6f),
|
BEE(BeeEntity.class, 122, 0.6f, 0.6f),
|
||||||
STRIDER(StriderEntity.class, 125, 1.7f, 0.9f, 0f, 0f, "minecraft:strider"), //TODO - update entity metadata
|
STRIDER(StriderEntity.class, 125, 1.7f, 0.9f, 0f, 0f, "minecraft:strider"),
|
||||||
HOGLIN(AnimalEntity.class, 124, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:hoglin"), //TODO
|
HOGLIN(AnimalEntity.class, 124, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:hoglin"),
|
||||||
ZOGLIN(ZoglinEntity.class, 126, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:zoglin"), //TODO
|
ZOGLIN(ZoglinEntity.class, 126, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:zoglin"),
|
||||||
PIGLIN(PiglinEntity.class, 123, 1.95f, 0.6f, 0.6f, 0f, "minecraft:piglin"), //TODO
|
PIGLIN(PiglinEntity.class, 123, 1.95f, 0.6f, 0.6f, 0f, "minecraft:piglin"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item frames are handled differently since they are a block in Bedrock.
|
* Item frames are handled differently since they are a block in Bedrock.
|
||||||
|
@ -114,7 +114,7 @@ public class InventoryUtils {
|
|||||||
|
|
||||||
public static void updateCursor(GeyserSession session) {
|
public static void updateCursor(GeyserSession session) {
|
||||||
InventorySlotPacket cursorPacket = new InventorySlotPacket();
|
InventorySlotPacket cursorPacket = new InventorySlotPacket();
|
||||||
cursorPacket.setContainerId(ContainerId.UI); //TODO: CHECK IF ACCURATE
|
cursorPacket.setContainerId(ContainerId.UI);
|
||||||
cursorPacket.setSlot(0);
|
cursorPacket.setSlot(0);
|
||||||
cursorPacket.setItem(ItemTranslator.translateToBedrock(session, session.getInventory().getCursor()));
|
cursorPacket.setItem(ItemTranslator.translateToBedrock(session, session.getInventory().getCursor()));
|
||||||
session.sendUpstreamPacket(cursorPacket);
|
session.sendUpstreamPacket(cursorPacket);
|
||||||
|
@ -483,8 +483,7 @@ public class MessageUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean isTooLong(String message, GeyserSession session) {
|
public static boolean isTooLong(String message, GeyserSession session) {
|
||||||
if (message.length() > 256) {
|
if (message.length() > 256) {
|
||||||
// TODO: Add Geyser localization and translate this based on language
|
session.sendMessage(LanguageUtils.getPlayerLocaleString("geyser.chat.too_long", session.getClientData().getLanguageCode(), message.length()));
|
||||||
session.sendMessage("Your message is bigger than 256 characters (" + message.length() + ") so it has not been sent.");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren