Java Code Examples for net.minecraft.world.World.setItemData()

The following are Jave code examples for showing how to use setItemData() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DecompiledMinecraft   File: ItemMap.java   Source Code and License Vote up 6 votes
/**
 * Called when item is crafted/smelted. Used only by maps so far.
 */
public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn)
{
    if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("map_is_scaling"))
    {
        MapData mapdata = Items.filled_map.getMapData(stack, worldIn);
        stack.setItemDamage(worldIn.getUniqueDataId("map"));
        MapData mapdata1 = new MapData("map_" + stack.getMetadata());
        mapdata1.scale = (byte)(mapdata.scale + 1);

        if (mapdata1.scale > 4)
        {
            mapdata1.scale = 4;
        }

        mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        worldIn.setItemData("map_" + stack.getMetadata(), mapdata1);
    }
}
 
Example 2
Project: DecompiledMinecraft   File: ItemMap.java   Source Code and License Vote up 6 votes
/**
 * Called when item is crafted/smelted. Used only by maps so far.
 */
public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn)
{
    if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("map_is_scaling"))
    {
        MapData mapdata = Items.filled_map.getMapData(stack, worldIn);
        stack.setItemDamage(worldIn.getUniqueDataId("map"));
        MapData mapdata1 = new MapData("map_" + stack.getMetadata());
        mapdata1.scale = (byte)(mapdata.scale + 1);

        if (mapdata1.scale > 4)
        {
            mapdata1.scale = 4;
        }

        mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        worldIn.setItemData("map_" + stack.getMetadata(), mapdata1);
    }
}
 
Example 3
Project: BaseClient   File: ItemMap.java   Source Code and License Vote up 6 votes
/**
 * Called when item is crafted/smelted. Used only by maps so far.
 */
public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn)
{
    if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("map_is_scaling"))
    {
        MapData mapdata = Items.filled_map.getMapData(stack, worldIn);
        stack.setItemDamage(worldIn.getUniqueDataId("map"));
        MapData mapdata1 = new MapData("map_" + stack.getMetadata());
        mapdata1.scale = (byte)(mapdata.scale + 1);

        if (mapdata1.scale > 4)
        {
            mapdata1.scale = 4;
        }

        mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        worldIn.setItemData("map_" + stack.getMetadata(), mapdata1);
    }
}
 
Example 4
Project: BaseClient   File: ItemMap.java   Source Code and License Vote up 6 votes
/**
 * Called when item is crafted/smelted. Used only by maps so far.
 */
public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn)
{
    if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("map_is_scaling"))
    {
        MapData mapdata = Items.filled_map.getMapData(stack, worldIn);
        stack.setItemDamage(worldIn.getUniqueDataId("map"));
        MapData mapdata1 = new MapData("map_" + stack.getMetadata());
        mapdata1.scale = (byte)(mapdata.scale + 1);

        if (mapdata1.scale > 4)
        {
            mapdata1.scale = 4;
        }

        mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        worldIn.setItemData("map_" + stack.getMetadata(), mapdata1);
    }
}
 
Example 5
Project: Backmemed   File: ItemMap.java   Source Code and License Vote up 6 votes
protected static void scaleMap(ItemStack p_185063_0_, World p_185063_1_, int p_185063_2_)
{
    MapData mapdata = Items.FILLED_MAP.getMapData(p_185063_0_, p_185063_1_);
    p_185063_0_.setItemDamage(p_185063_1_.getUniqueDataId("map"));
    MapData mapdata1 = new MapData("map_" + p_185063_0_.getMetadata());

    if (mapdata != null)
    {
        mapdata1.scale = (byte)MathHelper.clamp(mapdata.scale + p_185063_2_, 0, 4);
        mapdata1.trackingPosition = mapdata.trackingPosition;
        mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        p_185063_1_.setItemData("map_" + p_185063_0_.getMetadata(), mapdata1);
    }
}
 
Example 6
Project: Backmemed   File: ItemMap.java   Source Code and License Vote up 6 votes
protected static void enableMapTracking(ItemStack p_185064_0_, World p_185064_1_)
{
    MapData mapdata = Items.FILLED_MAP.getMapData(p_185064_0_, p_185064_1_);
    p_185064_0_.setItemDamage(p_185064_1_.getUniqueDataId("map"));
    MapData mapdata1 = new MapData("map_" + p_185064_0_.getMetadata());
    mapdata1.trackingPosition = true;

    if (mapdata != null)
    {
        mapdata1.xCenter = mapdata.xCenter;
        mapdata1.zCenter = mapdata.zCenter;
        mapdata1.scale = mapdata.scale;
        mapdata1.dimension = mapdata.dimension;
        mapdata1.markDirty();
        p_185064_1_.setItemData("map_" + p_185064_0_.getMetadata(), mapdata1);
    }
}
 
Example 7
Project: DecompiledMinecraft   File: MapGenStructure.java   Source Code and License Vote up 5 votes
private void func_143027_a(World worldIn)
{
    if (this.structureData == null)
    {
        this.structureData = (MapGenStructureData)worldIn.loadItemData(MapGenStructureData.class, this.getStructureName());

        if (this.structureData == null)
        {
            this.structureData = new MapGenStructureData(this.getStructureName());
            worldIn.setItemData(this.getStructureName(), this.structureData);
        }
        else
        {
            NBTTagCompound nbttagcompound = this.structureData.getTagCompound();

            for (String s : nbttagcompound.getKeySet())
            {
                NBTBase nbtbase = nbttagcompound.getTag(s);

                if (nbtbase.getId() == 10)
                {
                    NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbtbase;

                    if (nbttagcompound1.hasKey("ChunkX") && nbttagcompound1.hasKey("ChunkZ"))
                    {
                        int i = nbttagcompound1.getInteger("ChunkX");
                        int j = nbttagcompound1.getInteger("ChunkZ");
                        StructureStart structurestart = MapGenStructureIO.getStructureStart(nbttagcompound1, worldIn);

                        if (structurestart != null)
                        {
                            this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)), structurestart);
                        }
                    }
                }
            }
        }
    }
}
 
Example 8
Project: DecompiledMinecraft   File: ItemEmptyMap.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    ItemStack itemstack = new ItemStack(Items.filled_map, 1, worldIn.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    worldIn.setItemData(s, mapdata);
    mapdata.scale = 0;
    mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
    mapdata.dimension = (byte)worldIn.provider.getDimensionId();
    mapdata.markDirty();
    --itemStackIn.stackSize;

    if (itemStackIn.stackSize <= 0)
    {
        return itemstack;
    }
    else
    {
        if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
        {
            playerIn.dropPlayerItemWithRandomChoice(itemstack, false);
        }

        playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
        return itemStackIn;
    }
}
 
Example 9
Project: DecompiledMinecraft   File: MapGenStructure.java   Source Code and License Vote up 5 votes
private void func_143027_a(World worldIn)
{
    if (this.structureData == null)
    {
        this.structureData = (MapGenStructureData)worldIn.loadItemData(MapGenStructureData.class, this.getStructureName());

        if (this.structureData == null)
        {
            this.structureData = new MapGenStructureData(this.getStructureName());
            worldIn.setItemData(this.getStructureName(), this.structureData);
        }
        else
        {
            NBTTagCompound nbttagcompound = this.structureData.getTagCompound();

            for (String s : nbttagcompound.getKeySet())
            {
                NBTBase nbtbase = nbttagcompound.getTag(s);

                if (nbtbase.getId() == 10)
                {
                    NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbtbase;

                    if (nbttagcompound1.hasKey("ChunkX") && nbttagcompound1.hasKey("ChunkZ"))
                    {
                        int i = nbttagcompound1.getInteger("ChunkX");
                        int j = nbttagcompound1.getInteger("ChunkZ");
                        StructureStart structurestart = MapGenStructureIO.getStructureStart(nbttagcompound1, worldIn);

                        if (structurestart != null)
                        {
                            this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)), structurestart);
                        }
                    }
                }
            }
        }
    }
}
 
Example 10
Project: DecompiledMinecraft   File: ItemEmptyMap.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    ItemStack itemstack = new ItemStack(Items.filled_map, 1, worldIn.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    worldIn.setItemData(s, mapdata);
    mapdata.scale = 0;
    mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
    mapdata.dimension = (byte)worldIn.provider.getDimensionId();
    mapdata.markDirty();
    --itemStackIn.stackSize;

    if (itemStackIn.stackSize <= 0)
    {
        return itemstack;
    }
    else
    {
        if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
        {
            playerIn.dropPlayerItemWithRandomChoice(itemstack, false);
        }

        playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
        return itemStackIn;
    }
}
 
Example 11
Project: BaseClient   File: ItemEmptyMap.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    ItemStack itemstack = new ItemStack(Items.filled_map, 1, worldIn.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    worldIn.setItemData(s, mapdata);
    mapdata.scale = 0;
    mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
    mapdata.dimension = (byte)worldIn.provider.getDimensionId();
    mapdata.markDirty();
    --itemStackIn.stackSize;

    if (itemStackIn.stackSize <= 0)
    {
        return itemstack;
    }
    else
    {
        if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
        {
            playerIn.dropPlayerItemWithRandomChoice(itemstack, false);
        }

        playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
        return itemStackIn;
    }
}
 
Example 12
Project: BaseClient   File: ItemEmptyMap.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    ItemStack itemstack = new ItemStack(Items.filled_map, 1, worldIn.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    worldIn.setItemData(s, mapdata);
    mapdata.scale = 0;
    mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
    mapdata.dimension = (byte)worldIn.provider.getDimensionId();
    mapdata.markDirty();
    --itemStackIn.stackSize;

    if (itemStackIn.stackSize <= 0)
    {
        return itemstack;
    }
    else
    {
        if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
        {
            playerIn.dropPlayerItemWithRandomChoice(itemstack, false);
        }

        playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
        return itemStackIn;
    }
}
 
Example 13
Project: Backmemed   File: MapGenStructure.java   Source Code and License Vote up 5 votes
protected void initializeStructureData(World worldIn)
{
    if (this.structureData == null)
    {
        this.structureData = (MapGenStructureData)worldIn.loadItemData(MapGenStructureData.class, this.getStructureName());

        if (this.structureData == null)
        {
            this.structureData = new MapGenStructureData(this.getStructureName());
            worldIn.setItemData(this.getStructureName(), this.structureData);
        }
        else
        {
            NBTTagCompound nbttagcompound = this.structureData.getTagCompound();

            for (String s : nbttagcompound.getKeySet())
            {
                NBTBase nbtbase = nbttagcompound.getTag(s);

                if (nbtbase.getId() == 10)
                {
                    NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbtbase;

                    if (nbttagcompound1.hasKey("ChunkX") && nbttagcompound1.hasKey("ChunkZ"))
                    {
                        int i = nbttagcompound1.getInteger("ChunkX");
                        int j = nbttagcompound1.getInteger("ChunkZ");
                        StructureStart structurestart = MapGenStructureIO.getStructureStart(nbttagcompound1, worldIn);

                        if (structurestart != null)
                        {
                            this.structureMap.put(ChunkPos.asLong(i, j), structurestart);
                        }
                    }
                }
            }
        }
    }
}
 
Example 14
Project: Backmemed   File: ItemMap.java   Source Code and License Vote up 5 votes
public static ItemStack func_190906_a(World p_190906_0_, double p_190906_1_, double p_190906_3_, byte p_190906_5_, boolean p_190906_6_, boolean p_190906_7_)
{
    ItemStack itemstack = new ItemStack(Items.FILLED_MAP, 1, p_190906_0_.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    p_190906_0_.setItemData(s, mapdata);
    mapdata.scale = p_190906_5_;
    mapdata.calculateMapCenter(p_190906_1_, p_190906_3_, mapdata.scale);
    mapdata.dimension = (byte)p_190906_0_.provider.getDimensionType().getId();
    mapdata.trackingPosition = p_190906_6_;
    mapdata.field_191096_f = p_190906_7_;
    mapdata.markDirty();
    return itemstack;
}
 
Example 15
Project: CustomWorldGen   File: ItemMap.java   Source Code and License Vote up 5 votes
protected static void scaleMap(ItemStack p_185063_0_, World p_185063_1_, int p_185063_2_)
{
    MapData mapdata = Items.FILLED_MAP.getMapData(p_185063_0_, p_185063_1_);
    p_185063_0_.setItemDamage(p_185063_1_.getUniqueDataId("map"));
    MapData mapdata1 = new MapData("map_" + p_185063_0_.getMetadata());
    mapdata1.scale = (byte)MathHelper.clamp_int(mapdata.scale + p_185063_2_, 0, 4);
    mapdata1.trackingPosition = mapdata.trackingPosition;
    mapdata1.calculateMapCenter((double)mapdata.xCenter, (double)mapdata.zCenter, mapdata1.scale);
    mapdata1.dimension = mapdata.dimension;
    mapdata1.markDirty();
    p_185063_1_.setItemData("map_" + p_185063_0_.getMetadata(), mapdata1);
}
 
Example 16
Project: CustomWorldGen   File: ItemMap.java   Source Code and License Vote up 5 votes
protected static void enableMapTracking(ItemStack p_185064_0_, World p_185064_1_)
{
    MapData mapdata = Items.FILLED_MAP.getMapData(p_185064_0_, p_185064_1_);
    p_185064_0_.setItemDamage(p_185064_1_.getUniqueDataId("map"));
    MapData mapdata1 = new MapData("map_" + p_185064_0_.getMetadata());
    mapdata1.trackingPosition = true;
    mapdata1.xCenter = mapdata.xCenter;
    mapdata1.zCenter = mapdata.zCenter;
    mapdata1.scale = mapdata.scale;
    mapdata1.dimension = mapdata.dimension;
    mapdata1.markDirty();
    p_185064_1_.setItemData("map_" + p_185064_0_.getMetadata(), mapdata1);
}
 
Example 17
Project: CustomWorldGen   File: ItemEmptyMap.java   Source Code and License Vote up 5 votes
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
{
    ItemStack itemstack = new ItemStack(Items.FILLED_MAP, 1, worldIn.getUniqueDataId("map"));
    String s = "map_" + itemstack.getMetadata();
    MapData mapdata = new MapData(s);
    worldIn.setItemData(s, mapdata);
    mapdata.scale = 0;
    mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
    mapdata.dimension = worldIn.provider.getDimension();
    mapdata.trackingPosition = true;
    mapdata.markDirty();
    --itemStackIn.stackSize;

    if (itemStackIn.stackSize <= 0)
    {
        return new ActionResult(EnumActionResult.SUCCESS, itemstack);
    }
    else
    {
        if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
        {
            playerIn.dropItem(itemstack, false);
        }

        playerIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
    }
}
 
Example 18
Project: minecraft-territorialdealings   File: TerritoryMap.java   Source Code and License Vote up 5 votes
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
   {
	if (this.isMapReady(stack))
	{
		// Is already a map, so nothing to be done here
	}
	else
	{
		// Initiating it now
		stack.setTagCompound(new NBTTagCompound());
		stack.getTagCompound().setBoolean("initiated", true);

		stack.setItemDamage(world.getUniqueDataId("map"));

		String uniqueName = "map_" + stack.getItemDamage();

		MapData mapdata = new MapData(uniqueName);
        world.setItemData(uniqueName, mapdata);

        mapdata.scale = 2;					// Default scale
        int i = 128 * (1 << mapdata.scale);

        mapdata.xCenter = (int)(Math.round(player.posX / i) * i);
        mapdata.zCenter = (int)(Math.round(player.posZ / i) * i);
        mapdata.dimension = world.provider.getDimension();

        mapdata.markDirty();
	}

       return new ActionResult(EnumActionResult.PASS, stack);
   }
 
Example 19
Project: BaseClient   File: MapGenStructure.java   Source Code and License Vote up 4 votes
private void func_143027_a(World worldIn)
{
    if (this.structureData == null)
    {
        if (Reflector.ForgeWorld_getPerWorldStorage.exists())
        {
            MapStorage mapstorage = (MapStorage)Reflector.call(worldIn, Reflector.ForgeWorld_getPerWorldStorage, new Object[0]);
            this.structureData = (MapGenStructureData)mapstorage.loadData(MapGenStructureData.class, this.getStructureName());
        }
        else
        {
            this.structureData = (MapGenStructureData)worldIn.loadItemData(MapGenStructureData.class, this.getStructureName());
        }

        if (this.structureData == null)
        {
            this.structureData = new MapGenStructureData(this.getStructureName());

            if (Reflector.ForgeWorld_getPerWorldStorage.exists())
            {
                MapStorage mapstorage1 = (MapStorage)Reflector.call(worldIn, Reflector.ForgeWorld_getPerWorldStorage, new Object[0]);
                mapstorage1.setData(this.getStructureName(), this.structureData);
            }
            else
            {
                worldIn.setItemData(this.getStructureName(), this.structureData);
            }
        }
        else
        {
            NBTTagCompound nbttagcompound1 = this.structureData.getTagCompound();

            for (String s : nbttagcompound1.getKeySet())
            {
                NBTBase nbtbase = nbttagcompound1.getTag(s);

                if (nbtbase.getId() == 10)
                {
                    NBTTagCompound nbttagcompound = (NBTTagCompound)nbtbase;

                    if (nbttagcompound.hasKey("ChunkX") && nbttagcompound.hasKey("ChunkZ"))
                    {
                        int i = nbttagcompound.getInteger("ChunkX");
                        int j = nbttagcompound.getInteger("ChunkZ");
                        StructureStart structurestart = MapGenStructureIO.getStructureStart(nbttagcompound, worldIn);

                        if (structurestart != null)
                        {
                            this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)), structurestart);
                            this.structureLongMap.add(ChunkCoordIntPair.chunkXZ2Int(i, j), structurestart);
                        }
                    }
                }
            }
        }
    }
}
 
Example 20
Project: BaseClient   File: MapGenStructure.java   Source Code and License Vote up 4 votes
private void func_143027_a(World worldIn)
{
    if (this.structureData == null)
    {
        if (Reflector.ForgeWorld_getPerWorldStorage.exists())
        {
            MapStorage mapstorage = (MapStorage)Reflector.call(worldIn, Reflector.ForgeWorld_getPerWorldStorage, new Object[0]);
            this.structureData = (MapGenStructureData)mapstorage.loadData(MapGenStructureData.class, this.getStructureName());
        }
        else
        {
            this.structureData = (MapGenStructureData)worldIn.loadItemData(MapGenStructureData.class, this.getStructureName());
        }

        if (this.structureData == null)
        {
            this.structureData = new MapGenStructureData(this.getStructureName());

            if (Reflector.ForgeWorld_getPerWorldStorage.exists())
            {
                MapStorage mapstorage1 = (MapStorage)Reflector.call(worldIn, Reflector.ForgeWorld_getPerWorldStorage, new Object[0]);
                mapstorage1.setData(this.getStructureName(), this.structureData);
            }
            else
            {
                worldIn.setItemData(this.getStructureName(), this.structureData);
            }
        }
        else
        {
            NBTTagCompound nbttagcompound1 = this.structureData.getTagCompound();

            for (String s : nbttagcompound1.getKeySet())
            {
                NBTBase nbtbase = nbttagcompound1.getTag(s);

                if (nbtbase.getId() == 10)
                {
                    NBTTagCompound nbttagcompound = (NBTTagCompound)nbtbase;

                    if (nbttagcompound.hasKey("ChunkX") && nbttagcompound.hasKey("ChunkZ"))
                    {
                        int i = nbttagcompound.getInteger("ChunkX");
                        int j = nbttagcompound.getInteger("ChunkZ");
                        StructureStart structurestart = MapGenStructureIO.getStructureStart(nbttagcompound, worldIn);

                        if (structurestart != null)
                        {
                            this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)), structurestart);
                            this.structureLongMap.add(ChunkCoordIntPair.chunkXZ2Int(i, j), structurestart);
                        }
                    }
                }
            }
        }
    }
}