Search in sources :

Example 6 with ItemMap

use of net.minecraft.item.ItemMap in project UtilityClient2 by Utility-Client.

the class EntityItemFrame method removeFrameFromMap.

/**
 * Removes the dot representing this frame's position from the map when the item frame is broken.
 */
private void removeFrameFromMap(ItemStack p_110131_1_) {
    if (p_110131_1_ != null) {
        if (p_110131_1_.getItem() == Items.filled_map) {
            MapData mapdata = ((ItemMap) p_110131_1_.getItem()).getMapData(p_110131_1_, this.worldObj);
            mapdata.mapDecorations.remove("frame-" + this.getEntityId());
        }
        p_110131_1_.setItemFrame((EntityItemFrame) null);
    }
}
Also used : ItemMap(net.minecraft.item.ItemMap) MapData(net.minecraft.world.storage.MapData)

Aggregations

ItemMap (net.minecraft.item.ItemMap)6 MapData (net.minecraft.world.storage.MapData)6 ItemStack (net.minecraft.item.ItemStack)3 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 EntityClientPlayerMP (net.minecraft.client.entity.EntityClientPlayerMP)1 EntityPlayerSP (net.minecraft.client.entity.EntityPlayerSP)1 MapItemRenderer (net.minecraft.client.gui.MapItemRenderer)1 Tessellator (net.minecraft.client.renderer.Tessellator)1 Render (net.minecraft.client.renderer.entity.Render)1 RenderPlayer (net.minecraft.client.renderer.entity.RenderPlayer)1 EnumAction (net.minecraft.item.EnumAction)1 ItemCloth (net.minecraft.item.ItemCloth)1 Packet (net.minecraft.network.Packet)1 IItemRenderer (net.minecraftforge.client.IItemRenderer)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1