3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Clean up some TODOs

Dieser Commit ist enthalten in:
DoctorMacc 2020-07-08 12:36:26 -04:00
Ursprung 915ad2d057
Commit fe254380dc
7 geänderte Dateien mit 10 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -299,7 +299,7 @@ public class Entity {
}
} 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.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);
session.sendDownstreamPacket(releaseItemPacket);
}
@ -337,7 +337,7 @@ public class Entity {
if (entityMetadata.getValue().equals(Pose.SLEEPING)) {
metadata.getFlags().setFlag(EntityFlag.SLEEPING, true);
// 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()) {
Vector3i lastInteractionPos = session.getLastInteractionPosition();
metadata.put(EntityData.BED_POSITION, lastInteractionPos);

Datei anzeigen

@ -63,8 +63,6 @@ public class FishingHookEntity extends Entity {
}
}
//TODO Is ID 8 needed?
super.updateBedrockMetadata(entityMetadata, session);
}
}

Datei anzeigen

@ -52,7 +52,7 @@ public class PaintingEntity extends Entity {
AddPaintingPacket addPaintingPacket = new AddPaintingPacket();
addPaintingPacket.setUniqueEntityId(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.setDirection(direction);
session.sendUpstreamPacket(addPaintingPacket);

Datei anzeigen

@ -43,7 +43,7 @@ public class EndermanEntity extends MonsterEntity {
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
// Held block
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
if (entityMetadata.getId() == 16) {

Datei anzeigen

@ -151,10 +151,10 @@ public enum EntityType {
PANDA(PandaEntity.class, 113, 1.25f, 1.125f, 1.825f),
FOX(FoxEntity.class, 121, 0.5f, 1.25f),
BEE(BeeEntity.class, 122, 0.6f, 0.6f),
STRIDER(StriderEntity.class, 125, 1.7f, 0.9f, 0f, 0f, "minecraft:strider"), //TODO - update entity metadata
HOGLIN(AnimalEntity.class, 124, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:hoglin"), //TODO
ZOGLIN(ZoglinEntity.class, 126, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:zoglin"), //TODO
PIGLIN(PiglinEntity.class, 123, 1.95f, 0.6f, 0.6f, 0f, "minecraft:piglin"), //TODO
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"),
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"),
/**
* Item frames are handled differently since they are a block in Bedrock.

Datei anzeigen

@ -114,7 +114,7 @@ public class InventoryUtils {
public static void updateCursor(GeyserSession session) {
InventorySlotPacket cursorPacket = new InventorySlotPacket();
cursorPacket.setContainerId(ContainerId.UI); //TODO: CHECK IF ACCURATE
cursorPacket.setContainerId(ContainerId.UI);
cursorPacket.setSlot(0);
cursorPacket.setItem(ItemTranslator.translateToBedrock(session, session.getInventory().getCursor()));
session.sendUpstreamPacket(cursorPacket);

Datei anzeigen

@ -483,8 +483,7 @@ public class MessageUtils {
*/
public static boolean isTooLong(String message, GeyserSession session) {
if (message.length() > 256) {
// TODO: Add Geyser localization and translate this based on language
session.sendMessage("Your message is bigger than 256 characters (" + message.length() + ") so it has not been sent.");
session.sendMessage(LanguageUtils.getPlayerLocaleString("geyser.chat.too_long", session.getClientData().getLanguageCode(), message.length()));
return true;
}