Example #1
0
        public override void Func_28020_c(net.minecraft.src.ItemStack itemstack, net.minecraft.src.World
                                          world, net.minecraft.src.EntityPlayer entityplayer)
        {
            itemstack.SetItemDamage(world.Func_28104_b("map"));
            string s = (new java.lang.StringBuilder()).Append("map_").Append(itemstack.GetItemDamage
                                                                                 ()).ToString();

            net.minecraft.src.MapData mapdata = new net.minecraft.src.MapData(s);
            world.Func_28102_a(s, mapdata);
            mapdata.field_28164_b = net.minecraft.src.MathHelper.Floor_double(entityplayer.posX
                                                                              );
            mapdata.field_28163_c = net.minecraft.src.MathHelper.Floor_double(entityplayer.posZ
                                                                              );
            mapdata.field_28161_e = 3;
            mapdata.field_28162_d = unchecked ((byte)world.worldProvider.worldType);
            mapdata.Func_28146_a();
        }
Example #2
0
        public virtual net.minecraft.src.MapData Func_28023_a(net.minecraft.src.ItemStack
                                                              itemstack, net.minecraft.src.World world)
        {
            string s = (new java.lang.StringBuilder()).Append("map_").Append(itemstack.GetItemDamage
                                                                                 ()).ToString();

            net.minecraft.src.MapData mapdata = (net.minecraft.src.MapData)world.Func_28103_a
                                                    (Sharpen.Runtime.GetClassForType(typeof(net.minecraft.src.MapData)), (new java.lang.StringBuilder
                                                                                                                              ()).Append("map_").Append(itemstack.GetItemDamage()).ToString());
            if (mapdata == null)
            {
                itemstack.SetItemDamage(world.Func_28104_b("map"));
                string s1 = (new java.lang.StringBuilder()).Append("map_").Append(itemstack.GetItemDamage
                                                                                      ()).ToString();
                mapdata = new net.minecraft.src.MapData(s1);
                mapdata.field_28164_b = world.GetWorldInfo().GetSpawnX();
                mapdata.field_28163_c = world.GetWorldInfo().GetSpawnZ();
                mapdata.field_28161_e = 3;
                mapdata.field_28162_d = unchecked ((byte)world.worldProvider.worldType);
                mapdata.Func_28146_a();
                world.Func_28102_a(s1, mapdata);
            }
            return(mapdata);
        }