Bug getTranslation() retourne tile.stone.name


#1

getTranslation() retourne tile.stone.name
Bug ?

Log:

[21:19:55] [Server thread/INFO] [lockblock]: 0 - peek.getType().getId(): minecraft:glass - peek.getType().getTranslation().get(): Glass
[21:19:55] [Server thread/INFO] [lockblock]: 1 - peek.getType().getId(): minecraft:wool - peek.getType().getTranslation().get(): Wool
[21:19:55] [Server thread/INFO] [lockblock]: 2 - peek.getType().getId(): minecraft:log - peek.getType().getTranslation().get(): Wood
[21:19:55] [Server thread/INFO] [lockblock]: 3 - peek.getType().getId(): minecraft:grass - peek.getType().getTranslation().get(): Grass Block
[21:19:55] [Server thread/INFO] [lockblock]: 4 - peek.getType().getId(): minecraft:stone - peek.getType().getTranslation().get(): tile.stone.name
[21:19:55] [Server thread/INFO] [lockblock]: 5 - peek.getType().getId(): minecraft:chest - peek.getType().getTranslation().get(): Chest

Code:

    for(Inventory inventory : chest.getInventory().slots()) {
        Optional<ItemStack> peekOptional = inventory.peek();
        if(peekOptional.isPresent()) {
            ItemStack peek = peekOptional.get();
            Tool.getLogger().info(i + " - peek.getType().getId(): " + peek.getType().getId() + " - peek.getType().getTranslation().get(): " + peek.getType().getTranslation().get());
        }
        i++;
    }

#2

What block is returning that value? Is it minecraft:stone?

Also, bugs like this should really be reported on the sponge api github issues board.


#3

https://github.com/SpongePowered/SpongeForge/issues ?

All Stone:

[22:32:08] [Server thread/INFO] [lockbloc]: 0 - peek.getType().getId(): minecraft:stone (minecraft:stone) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 1 - peek.getType().getId(): minecraft:stone (minecraft:granite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 2 - peek.getType().getId(): minecraft:stone (minecraft:smooth_granite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 3 - peek.getType().getId(): minecraft:stone (minecraft:diorite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 4 - peek.getType().getId(): minecraft:stone (minecraft:smooth_diorite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 5 - peek.getType().getId(): minecraft:stone (minecraft:andesite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 6 - peek.getType().getId(): minecraft:stone (minecraft:smooth_andesite) - peek.getType().getTranslation().get(): tile.stone.name
[22:32:08] [Server thread/INFO] [lockbloc]: 7 - peek.getType().getId(): minecraft:wool. - peek.getType().getTranslation().get(): Wool
[22:32:08] [Server thread/INFO] [lockbloc]: 8 - peek.getType().getId(): minecraft:grass. - peek.getType().getTranslation().get(): Grass Block
[22:32:08] [Server thread/INFO] [lockbloc]: 9 - peek.getType().getId(): minecraft:glass. - peek.getType().getTranslation().get(): Glass
[22:32:08] [Server thread/INFO] [lockbloc]: 10 - peek.getType().getId(): minecraft:log. - peek.getType().getTranslation().get(): Wood

#4

That is sponge forge. If it is specific to sponge forge then it would go there. Here is sponge common that is specific to sponge vanilla and sponge forge