Skip to content

Wand copy/paste does not work for items with tag information #114

@VictorColomb

Description

@VictorColomb

Description of the issue

Upon pasting using the Wand of the Lazy Builder, certain items do not get placed down.
It seems like this happens with items with a tag NBT property.

Example 1: Immersive Engineering's conveyor belts.

Below is the NBT data of a number conveyor belts in my inventory.
In this example, no conveyor belts will be added to the world upon pasting.

{
    "Inventory": [
        // some items before
        {
            "tag": {
                "conveyorType": "immersiveengineering:vertical"
            },
            "Count": 5,
            "Damage": 0,
            "id": "immersiveengineering:conveyor",
            "Slot": 5
        },
        // some items after
    ]
}
NBTExplorer screenshot image

Example 2: Mekanism's universal transporters.

Below is the NBT data of a number of Ultimate Logistical Transporters in my inventory.
In this example, only Mekanism pipes of the Basic tier will be added to the world ("tier": 0), if you have some in your inventory.

The damage seems to work however: a Logistical Transporter (damage 3) will be pasted into the correct kind, and a Universal Cable (damage 0) as well.

{
    "Inventory": [
        // some items before
        {
            "tag": {
                "tier": 3 // tier 3, for example, is Ultimate
            },
            "Count": 64,
            "Damage": 3, // damage indicates the type of transmitter (here, Logistical Transporter)
            "id": "mekanism:transmitter",
            "Slot": 4
        },
        // some items after
    ]
}
NBTExplorer screenshot image

Installation details

  • Minecraft 1.12.2
  • Forge 14.23.5.2860
  • FML 8.0.99.99
  • EnderUtilities 0.7.15
  • Mekanism 1.12.2-9.8.3.390
  • Immersive Engineering 0.12-98

Investigation

Something is definitely going wrong in ItemBuildersWand::getAndConsumeBuildItem.

I suspect that the issue stems from ‎BlockUtils::getPickBlockItemStack not creating a Tile Entity before calling state.getBlock().getPickBlock().

  • In the case of the Immersive Engineering conveyors, this would mean that without a Tile Entity, conveyors have no default pick block.
  • In the case of the Mekanism transmitters, the type of transmitter (equivalent to the item damage) is probably stored in the IBlockState and the default pick block is that of tier 0.

Another clue maybe: RFTools's builder has a copy and paste function as well, which seems to work with at least Immersive Engineering conveyors. I will try to look into that.

If I find some time, I'll setup a full developer environment and see if I can find a fix. 🤞

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions