Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-279601

"test.error.expected_entity_at_pos" translation is missing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 25w04a
    • 25w03a
    • None
    • Community Consensus
    • Text
    • Normal
    • Platform

      The GameTestHelper#findClosestEntity uses the "test.error.expected_entity_at_pos" translation, which is missing on Crowdin.

      (The decompiled GameTestHelper#findClosestEntity method)

      public <E extends Entity> E findClosestEntity(EntityType<E> entityType, int i, int j, int k, double d) {
        List<E> list = this.findEntities(entityType, i, j, k, d);
        if (list.isEmpty()) {
          throw this.assertionException("test.error.expected_entity_at_pos", entityType.getDescription(), i, j, k);
        } else if (list.size() > 1) {
          throw this.assertionException("test.error.too_many_entities", entityType.toShortString(), i, j, k, list.size());
        } else {
          Vec3 vec3 = this.absoluteVec(new Vec3((double)i, (double)j, (double)k));
          list.sort((entity, entity2) -> {
            double dxx = entity.position().distanceTo(vec3);
            double e = entity2.position().distanceTo(vec3);
            return Double.compare(dxx, e);
          });
          return (E)list.get(0);
        }
      }
      

      On Crowdin, there is the "test.error.expected_entity_around" translation, which is missing in the game code. Both strings have the same 4 variables (entity type, X, Y, Z). It seems that one of these was not updated before releasing the snapshot.

      Possible solution 1:
      Replace the string in the GameTestHelper#findClosestEntity from "test.error.expected_entity_at_pos" to "test.error.expected_entity_around".

      Possible solution 2:
      Rename the "test.error.expected_entity_around" translation key to "test.error.expected_entity_at_pos".

            slicedlime [Mojang] slicedlime
            Jerozgen Jerozgen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: