Example #1
0
 protected internal BlockContainer(int i, net.minecraft.src.Material material)
     : base(i, material)
 {
     // Referenced classes of package net.minecraft.src:
     //            Block, World, Material, TileEntity
     isBlockContainer[i] = true;
 }
Example #2
0
        public virtual void TriggerNote(net.minecraft.src.World world, int i, int j, int
                                        k)
        {
            if (world.GetBlockMaterial(i, j + 1, k) != net.minecraft.src.Material.air)
            {
                return;
            }
            net.minecraft.src.Material material = world.GetBlockMaterial(i, j - 1, k);
            byte byte0 = 0;

            if (material == net.minecraft.src.Material.rock)
            {
                byte0 = 1;
            }
            if (material == net.minecraft.src.Material.sand)
            {
                byte0 = 2;
            }
            if (material == net.minecraft.src.Material.glass)
            {
                byte0 = 3;
            }
            if (material == net.minecraft.src.Material.wood)
            {
                byte0 = 4;
            }
            world.PlayNoteAt(i, j, k, byte0, note);
        }
 protected internal BlockLeavesBase(int i, int j, net.minecraft.src.Material material
                                    , bool flag)
     : base(i, j, material)
 {
     // Referenced classes of package net.minecraft.src:
     //            Block, Material
     graphicsLevel = flag;
 }
Example #4
0
 protected internal BlockBreakable(int i, int j, net.minecraft.src.Material material
                                   , bool flag)
     : base(i, j, material)
 {
     // Referenced classes of package net.minecraft.src:
     //            Block, Material
     field_6084_a = flag;
 }
Example #5
0
 public ItemDoor(int i, net.minecraft.src.Material material)
     : base(i)
 {
     // Referenced classes of package net.minecraft.src:
     //            Item, Material, Block, EntityPlayer,
     //            MathHelper, World, ItemStack
     field_260_a  = material;
     maxStackSize = 1;
 }
Example #6
0
 public override void OnNeighborBlockChange(net.minecraft.src.World world, int i,
                                            int j, int k, int l)
 {
     base.OnNeighborBlockChange(world, i, j, k, l);
     net.minecraft.src.Material material = world.GetBlockMaterial(i, j + 1, k);
     if (material.IsSolid())
     {
         world.SetBlockWithNotify(i, j, k, net.minecraft.src.Block.DIRT.ID);
     }
 }
Example #7
0
 public override void HarvestBlock(net.minecraft.src.World world, net.minecraft.src.EntityPlayer
                                   entityplayer, int i, int j, int k, int l)
 {
     base.HarvestBlock(world, entityplayer, i, j, k, l);
     net.minecraft.src.Material material = world.GetBlockMaterial(i, j - 1, k);
     if (material.GetIsSolid() || material.GetIsLiquid())
     {
         world.SetBlockWithNotify(i, j, k, net.minecraft.src.Block.WATER.ID);
     }
 }
Example #8
0
 protected internal BlockFlowing(int i, net.minecraft.src.Material material)
     : base(i, material)
 {
     // Referenced classes of package net.minecraft.src:
     //            BlockFluid, World, Material, WorldProvider,
     //            Block
     field_659_a = 0;
     field_658_b = new bool[4];
     field_660_c = new int[4];
 }
Example #9
0
 static Material()
 {
     air = new net.minecraft.src.MaterialTransparent(net.minecraft.src.MapColor.field_28199_b
                                                     );
     grass  = new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28198_c);
     ground = new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28189_l);
     wood   = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28186_o))
              .SetBurning();
     rock = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28188_m))
            .Func_31058_n();
     iron = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28193_h))
            .Func_31058_n();
     water = (new net.minecraft.src.MaterialLiquid(net.minecraft.src.MapColor.field_28187_n
                                                   )).SetNoPushMobility();
     lava = (new net.minecraft.src.MaterialLiquid(net.minecraft.src.MapColor.field_28195_f
                                                  )).SetNoPushMobility();
     leaves = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28192_i
                                              )).SetBurning().Func_28129_i().SetNoPushMobility();
     plants = (new net.minecraft.src.MaterialLogic(net.minecraft.src.MapColor.field_28192_i
                                                   )).SetNoPushMobility();
     sponge = new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28196_e);
     cloth  = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28196_e)
               ).SetBurning();
     fire = (new net.minecraft.src.MaterialTransparent(net.minecraft.src.MapColor.field_28199_b
                                                       )).SetNoPushMobility();
     sand     = new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28197_d);
     circuits = (new net.minecraft.src.MaterialLogic(net.minecraft.src.MapColor.field_28199_b
                                                     )).SetNoPushMobility();
     glass = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28199_b)
              ).Func_28129_i();
     tnt = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28195_f)).
           SetBurning().Func_28129_i();
     wug = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28192_i)).
           SetNoPushMobility();
     ice = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28194_g)).
           Func_28129_i();
     snow = (new net.minecraft.src.MaterialLogic(net.minecraft.src.MapColor.field_28191_j
                                                 )).Func_27089_f().Func_28129_i().Func_31058_n().SetNoPushMobility();
     builtSnow = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28191_j
                                                 )).Func_31058_n();
     cactus = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28192_i
                                              )).Func_28129_i().SetNoPushMobility();
     clay    = new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28190_k);
     pumpkin = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28192_i
                                               )).SetNoPushMobility();
     portal = (new net.minecraft.src.MaterialPortal(net.minecraft.src.MapColor.field_28199_b
                                                    )).SetImmovableMobility();
     cakeMaterial = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28199_b
                                                    )).SetNoPushMobility();
     web = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28196_e)).
           Func_31058_n().SetNoPushMobility();
     piston = (new net.minecraft.src.Material(net.minecraft.src.MapColor.field_28188_m
                                              )).SetImmovableMobility();
 }
Example #10
0
 protected internal BlockStationary(int i, net.minecraft.src.Material material)
     : base(i, material)
 {
     // Referenced classes of package net.minecraft.src:
     //            BlockFluid, Material, World, Block,
     //            BlockFire
     SetTickOnLoad(false);
     if (material == net.minecraft.src.Material.lava)
     {
         SetTickOnLoad(true);
     }
 }
Example #11
0
        protected internal BlockFluid(int i, net.minecraft.src.Material material)
            : base(i, (material != net.minecraft.src.Material.lava ? 12 : 14) * 16 + 13, material
                   )
        {
            // Referenced classes of package net.minecraft.src:
            //            Block, Material, World, IBlockAccess,
            //            Vec3D, AxisAlignedBB, Entity
            float f  = 0.0F;
            float f1 = 0.0F;

            SetBlockBounds(0.0F + f1, 0.0F + f, 0.0F + f1, 1.0F + f1, 1.0F + f, 1.0F + f1);
            SetTickOnLoad(true);
        }
Example #12
0
 protected internal Block(int i, net.minecraft.src.Material material)
 {
     // Referenced classes of package net.minecraft.src:
     //            Material, IBlockAccess, AxisAlignedBB, EntityPlayer,
     //            World, ItemStack, EntityItem, Vec3D,
     //            MovingObjectPosition, StatList, StatCollector, StepSound,
     //            StepSoundStone, StepSoundSand, BlockStone, BlockGrass,
     //            BlockDirt, BlockSapling, BlockFlowing, BlockStationary,
     //            BlockSand, BlockGravel, BlockOre, BlockLog,
     //            BlockLeaves, BlockSponge, BlockGlass, BlockDispenser,
     //            BlockSandStone, BlockNote, BlockBed, BlockRail,
     //            BlockDetectorRail, BlockPistonBase, BlockWeb, BlockTallGrass,
     //            BlockDeadBush, BlockPistonExtension, BlockCloth, BlockPistonMoving,
     //            BlockFlower, BlockMushroom, BlockOreStorage, BlockStep,
     //            BlockTNT, BlockBookshelf, BlockObsidian, BlockTorch,
     //            BlockFire, BlockMobSpawner, BlockStairs, BlockChest,
     //            BlockRedstoneWire, BlockWorkbench, BlockCrops, BlockFarmland,
     //            BlockFurnace, BlockSign, TileEntitySign, BlockDoor,
     //            BlockLadder, BlockLever, BlockPressurePlate, EnumMobType,
     //            BlockRedstoneOre, BlockRedstoneTorch, BlockButton, BlockSnow,
     //            BlockIce, BlockSnowBlock, BlockCactus, BlockClay,
     //            BlockReed, BlockJukeBox, BlockFence, BlockPumpkin,
     //            BlockNetherrack, BlockSoulSand, BlockGlowStone, BlockPortal,
     //            BlockCake, BlockRedstoneRepeater, BlockLockedChest, BlockTrapDoor,
     //            Item, ItemCloth, ItemLog, ItemSlab,
     //            ItemSapling, ItemLeaves, ItemPiston, ItemBlock,
     //            Entity, EntityLiving
     blockConstructorCalled = true;
     enableStats            = true;
     stepSound            = soundPowderFootstep;
     blockParticleGravity = 1.0F;
     slipperiness         = 0.6F;
     if (blocksList[i] != null)
     {
         throw new System.ArgumentException((new java.lang.StringBuilder()).Append("Slot "
                                                                                   ).Append(i).Append(" is already occupied by ").Append(blocksList[i]).Append(" when adding "
                                                                                                                                                               ).Append(this).ToString());
     }
     else
     {
         blockMaterial = material;
         blocksList[i] = this;
         ID            = i;
         SetBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         opaqueCubeLookup[i] = IsOpaqueCube();
         lightOpacity[i]     = IsOpaqueCube() ? 255 : 0;
         canBlockGrass[i]    = !material.GetCanBlockGrass();
         isBlockContainer[i] = false;
         return;
     }
 }
Example #13
0
        protected internal BlockPressurePlate(int i, int j, net.minecraft.src.EnumMobType
                                              enummobtype, net.minecraft.src.Material material)
            : base(i, j, material)
        {
            // Referenced classes of package net.minecraft.src:
            //            Block, World, EnumMobType, AxisAlignedBB,
            //            EntityLiving, EntityPlayer, IBlockAccess, Material,
            //            Entity
            triggerMobType = enummobtype;
            SetTickOnLoad(true);
            float f = 0.0625F;

            SetBlockBounds(f, 0.0F, f, 1.0F - f, 0.03125F, 1.0F - f);
        }
Example #14
0
 private bool Func_312_l(net.minecraft.src.World world, int i, int j, int k)
 {
     net.minecraft.src.Material material = world.GetBlockMaterial(i, j, k);
     if (material == blockMaterial)
     {
         return(false);
     }
     if (material == net.minecraft.src.Material.lava)
     {
         return(false);
     }
     else
     {
         return(!Func_309_k(world, i, j, k));
     }
 }
Example #15
0
        protected internal BlockTrapDoor(int i, net.minecraft.src.Material material)
            : base(i, material)
        {
            // Referenced classes of package net.minecraft.src:
            //            Block, Material, IBlockAccess, World,
            //            AxisAlignedBB, EntityPlayer, Vec3D, MovingObjectPosition
            blockIndexInTexture = 84;
            if (material == net.minecraft.src.Material.iron)
            {
                blockIndexInTexture++;
            }
            float f  = 0.5F;
            float f1 = 1.0F;

            SetBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
        }
        private EnumCreatureType(string s, int i, System.Type class1, int j, net.minecraft.src.Material
                                 material, bool flag)
        {
            // Referenced classes of package net.minecraft.src:
            //            IMob, Material, EntityAnimal, EntityWaterMob

            /*
             *
             *  public static EnumCreatureType valueOf(String s)
             *  {
             *      return (EnumCreatureType)Enum.valueOf(net.minecraft.src.EnumCreatureType.class, s);
             *  }
             */
            //        super(s, i);
            creatureClass       = class1;
            maxNumberOfCreature = j;
            creatureMaterial    = material;
            field_21106_g       = flag;
        }
Example #17
0
        private bool Func_309_k(net.minecraft.src.World world, int x, int y, int z)
        {
            int l = world.GetBlockId(x, y, z);

            if (l == net.minecraft.src.Block.WOODEN_DOOR.ID ||
                l == net.minecraft.src.Block.IRON_DOOR_BLOCK.ID ||
                l == net.minecraft.src.Block.SIGN_POST.ID ||
                l == net.minecraft.src.Block.LADDER.ID ||
                l == net.minecraft.src.Block.SUGAR_CANE_BLOCK.ID)
            {
                return(true);
            }
            if (l == 0)
            {
                return(false);
            }
            net.minecraft.src.Material material = net.minecraft.src.Block.blocksList[l].blockMaterial;
            return(material.GetIsSolid());
        }
Example #18
0
 private int GetVerticalOffset(net.minecraft.src.Entity entity, int i, int j, int
                               k, net.minecraft.src.PathPoint pathpoint)
 {
     for (int l = i; l < i + pathpoint.xCoord; l++)
     {
         for (int i1 = j; i1 < j + pathpoint.yCoord; i1++)
         {
             for (int j1 = k; j1 < k + pathpoint.zCoord; j1++)
             {
                 int k1 = worldMap.GetBlockId(l, i1, j1);
                 if (k1 <= 0)
                 {
                     continue;
                 }
                 if (k1 == net.minecraft.src.Block.IRON_DOOR_BLOCK.ID || k1 == net.minecraft.src.Block
                     .WOODEN_DOOR.ID)
                 {
                     int l1 = worldMap.GetBlockMetadata(l, i1, j1);
                     if (!net.minecraft.src.BlockDoor.Func_27036_e(l1))
                     {
                         return(0);
                     }
                     continue;
                 }
                 net.minecraft.src.Material material = net.minecraft.src.Block.blocksList[k1].blockMaterial;
                 if (material.GetIsSolid())
                 {
                     return(0);
                 }
                 if (material == net.minecraft.src.Material.water)
                 {
                     return(-1);
                 }
                 if (material == net.minecraft.src.Material.lava)
                 {
                     return(-2);
                 }
             }
         }
     }
     return(1);
 }
Example #19
0
        public static bool CanFallBelow(net.minecraft.src.World world, int i, int j, int
                                        k)
        {
            int l = world.GetBlockId(i, j, k);

            if (l == 0)
            {
                return(true);
            }
            if (l == net.minecraft.src.Block.FIRE.ID)
            {
                return(true);
            }
            net.minecraft.src.Material material = net.minecraft.src.Block.blocksList[l].blockMaterial;
            if (material == net.minecraft.src.Material.water)
            {
                return(true);
            }
            return(material == net.minecraft.src.Material.lava);
        }
Example #20
0
        public virtual bool IsInsideOfMaterial(net.minecraft.src.Material material)
        {
            double d = posY + (double)GetEyeHeight();
            int    i = net.minecraft.src.MathHelper.Floor_double(posX);
            int    j = net.minecraft.src.MathHelper.Floor_float(net.minecraft.src.MathHelper.Floor_double
                                                                    (d));
            int k = net.minecraft.src.MathHelper.Floor_double(posZ);
            int l = worldObj.GetBlockId(i, j, k);

            if (l != 0 && net.minecraft.src.Block.blocksList[l].blockMaterial == material)
            {
                float f = net.minecraft.src.BlockFluid.SetFluidHeight(worldObj.GetBlockMetadata(i
                                                                                                , j, k)) - 0.1111111F;
                float f1 = (float)(j + 1) - f;
                return(d < (double)f1);
            }
            else
            {
                return(false);
            }
        }
Example #21
0
 public override bool ShouldSideBeRendered(net.minecraft.src.IBlockAccess iblockaccess
                                           , int i, int j, int k, int l)
 {
     net.minecraft.src.Material material = iblockaccess.GetBlockMaterial(i, j, k);
     if (material == blockMaterial)
     {
         return(false);
     }
     if (material == net.minecraft.src.Material.ice)
     {
         return(false);
     }
     if (l == 1)
     {
         return(true);
     }
     else
     {
         return(base.ShouldSideBeRendered(iblockaccess, i, j, k, l));
     }
 }
Example #22
0
        public override bool Generate(net.minecraft.src.World world, SharpBukkitLive.SharpBukkit.SharpRandom random
                                      , int i, int j, int k)
        {
            i -= 8;
            for (k -= 8; j > 0 && world.IsAirBlock(i, j, k); j--)
            {
            }
            j -= 4;
            bool[] aflag = new bool[2048];
            int    l     = random.Next(4) + 4;

            for (int i1 = 0; i1 < l; i1++)
            {
                double d  = random.NextDouble() * 6D + 3D;
                double d1 = random.NextDouble() * 4D + 2D;
                double d2 = random.NextDouble() * 6D + 3D;
                double d3 = random.NextDouble() * (16D - d - 2D) + 1.0D + d / 2D;
                double d4 = random.NextDouble() * (8D - d1 - 4D) + 2D + d1 / 2D;
                double d5 = random.NextDouble() * (16D - d2 - 2D) + 1.0D + d2 / 2D;
                for (int j4 = 1; j4 < 15; j4++)
                {
                    for (int k4 = 1; k4 < 15; k4++)
                    {
                        for (int l4 = 1; l4 < 7; l4++)
                        {
                            double d6 = ((double)j4 - d3) / (d / 2D);
                            double d7 = ((double)l4 - d4) / (d1 / 2D);
                            double d8 = ((double)k4 - d5) / (d2 / 2D);
                            double d9 = d6 * d6 + d7 * d7 + d8 * d8;
                            if (d9 < 1.0D)
                            {
                                aflag[(j4 * 16 + k4) * 8 + l4] = true;
                            }
                        }
                    }
                }
            }
            for (int j1 = 0; j1 < 16; j1++)
            {
                for (int j2 = 0; j2 < 16; j2++)
                {
                    for (int j3 = 0; j3 < 8; j3++)
                    {
                        bool flag = !aflag[(j1 * 16 + j2) * 8 + j3] && (j1 < 15 && aflag[((j1 + 1) * 16 +
                                                                                          j2) * 8 + j3] || j1 > 0 && aflag[((j1 - 1) * 16 + j2) * 8 + j3] || j2 < 15 && aflag
                                                                        [(j1 * 16 + (j2 + 1)) * 8 + j3] || j2 > 0 && aflag[(j1 * 16 + (j2 - 1)) * 8 + j3
                                                                        ] || j3 < 7 && aflag[(j1 * 16 + j2) * 8 + (j3 + 1)] || j3 > 0 && aflag[(j1 * 16
                                                                                                                                                + j2) * 8 + (j3 - 1)]);
                        if (!flag)
                        {
                            continue;
                        }
                        net.minecraft.src.Material material = world.GetBlockMaterial(i + j1, j + j3, k +
                                                                                     j2);
                        if (j3 >= 4 && material.GetIsLiquid())
                        {
                            return(false);
                        }
                        if (j3 < 4 && !material.IsSolid() && world.GetBlockId(i + j1, j + j3, k + j2) !=
                            field_15005_a)
                        {
                            return(false);
                        }
                    }
                }
            }
            for (int k1 = 0; k1 < 16; k1++)
            {
                for (int k2 = 0; k2 < 16; k2++)
                {
                    for (int k3 = 0; k3 < 8; k3++)
                    {
                        if (aflag[(k1 * 16 + k2) * 8 + k3])
                        {
                            world.SetBlock(i + k1, j + k3, k + k2, k3 < 4 ? field_15005_a : 0);
                        }
                    }
                }
            }
            for (int l1 = 0; l1 < 16; l1++)
            {
                for (int l2 = 0; l2 < 16; l2++)
                {
                    for (int l3 = 4; l3 < 8; l3++)
                    {
                        if (aflag[(l1 * 16 + l2) * 8 + l3] && world.GetBlockId(i + l1, (j + l3) - 1, k +
                                                                               l2) == net.minecraft.src.Block.DIRT.ID && world.GetSavedLightValue(net.minecraft.src.EnumSkyBlock
                                                                                                                                                  .Sky, i + l1, j + l3, k + l2) > 0)
                        {
                            world.SetBlock(i + l1, (j + l3) - 1, k + l2, net.minecraft.src.Block.GRASS.ID
                                           );
                        }
                    }
                }
            }
            if (net.minecraft.src.Block.blocksList[field_15005_a].blockMaterial == net.minecraft.src.Material
                .lava)
            {
                for (int i2 = 0; i2 < 16; i2++)
                {
                    for (int i3 = 0; i3 < 16; i3++)
                    {
                        for (int i4 = 0; i4 < 8; i4++)
                        {
                            bool flag1 = !aflag[(i2 * 16 + i3) * 8 + i4] && (i2 < 15 && aflag[((i2 + 1) * 16
                                                                                               + i3) * 8 + i4] || i2 > 0 && aflag[((i2 - 1) * 16 + i3) * 8 + i4] || i3 < 15 &&
                                                                             aflag[(i2 * 16 + (i3 + 1)) * 8 + i4] || i3 > 0 && aflag[(i2 * 16 + (i3 - 1)) * 8
                                                                                                                                     + i4] || i4 < 7 && aflag[(i2 * 16 + i3) * 8 + (i4 + 1)] || i4 > 0 && aflag[(i2
                                                                                                                                                                                                                 * 16 + i3) * 8 + (i4 - 1)]);
                            if (flag1 && (i4 < 4 || random.Next(2) != 0) && world.GetBlockMaterial(i + i2,
                                                                                                   j + i4, k + i3).IsSolid())
                            {
                                world.SetBlock(i + i2, j + i4, k + i3, net.minecraft.src.Block.STONE.ID);
                            }
                        }
                    }
                }
            }
            return(true);
        }
Example #23
0
        // Referenced classes of package net.minecraft.src:
        //            WorldGenerator, World, Material, Block,
        //            TileEntityChest, TileEntityMobSpawner, ItemStack, Item
        public override bool Generate(net.minecraft.src.World world, SharpBukkitLive.SharpBukkit.SharpRandom random
                                      , int i, int j, int k)
        {
            byte byte0 = 3;
            int  l     = random.Next(2) + 2;
            int  i1    = random.Next(2) + 2;
            int  j1    = 0;

            for (int k1 = i - l - 1; k1 <= i + l + 1; k1++)
            {
                for (int j2 = j - 1; j2 <= j + byte0 + 1; j2++)
                {
                    for (int i3 = k - i1 - 1; i3 <= k + i1 + 1; i3++)
                    {
                        net.minecraft.src.Material material = world.GetBlockMaterial(k1, j2, i3);
                        if (j2 == j - 1 && !material.IsSolid())
                        {
                            return(false);
                        }
                        if (j2 == j + byte0 + 1 && !material.IsSolid())
                        {
                            return(false);
                        }
                        if ((k1 == i - l - 1 || k1 == i + l + 1 || i3 == k - i1 - 1 || i3 == k + i1 + 1) &&
                            j2 == j && world.IsAirBlock(k1, j2, i3) && world.IsAirBlock(k1, j2 + 1, i3))
                        {
                            j1++;
                        }
                    }
                }
            }
            if (j1 < 1 || j1 > 5)
            {
                return(false);
            }
            for (int l1 = i - l - 1; l1 <= i + l + 1; l1++)
            {
                for (int k2 = j + byte0; k2 >= j - 1; k2--)
                {
                    for (int j3 = k - i1 - 1; j3 <= k + i1 + 1; j3++)
                    {
                        if (l1 == i - l - 1 || k2 == j - 1 || j3 == k - i1 - 1 || l1 == i + l + 1 || k2 ==
                            j + byte0 + 1 || j3 == k + i1 + 1)
                        {
                            if (k2 >= 0 && !world.GetBlockMaterial(l1, k2 - 1, j3).IsSolid())
                            {
                                world.SetBlockWithNotify(l1, k2, j3, 0);
                                continue;
                            }
                            if (!world.GetBlockMaterial(l1, k2, j3).IsSolid())
                            {
                                continue;
                            }
                            if (k2 == j - 1 && random.Next(4) != 0)
                            {
                                world.SetBlockWithNotify(l1, k2, j3, net.minecraft.src.Block.MOSSY_COBBLESTONE.ID
                                                         );
                            }
                            else
                            {
                                world.SetBlockWithNotify(l1, k2, j3, net.minecraft.src.Block.COBBLESTONE.ID);
                            }
                        }
                        else
                        {
                            world.SetBlockWithNotify(l1, k2, j3, 0);
                        }
                    }
                }
            }
            for (int i2 = 0; i2 < 2; i2++)
            {
                for (int l2 = 0; l2 < 3; l2++)
                {
                    int k3 = (i + random.Next(l * 2 + 1)) - l;
                    int l3 = j;
                    int i4 = (k + random.Next(i1 * 2 + 1)) - i1;
                    if (!world.IsAirBlock(k3, l3, i4))
                    {
                        continue;
                    }
                    int j4 = 0;
                    if (world.GetBlockMaterial(k3 - 1, l3, i4).IsSolid())
                    {
                        j4++;
                    }
                    if (world.GetBlockMaterial(k3 + 1, l3, i4).IsSolid())
                    {
                        j4++;
                    }
                    if (world.GetBlockMaterial(k3, l3, i4 - 1).IsSolid())
                    {
                        j4++;
                    }
                    if (world.GetBlockMaterial(k3, l3, i4 + 1).IsSolid())
                    {
                        j4++;
                    }
                    if (j4 != 1)
                    {
                        continue;
                    }
                    world.SetBlockWithNotify(k3, l3, i4, net.minecraft.src.Block.CHEST.ID);
                    net.minecraft.src.TileEntityChest tileentitychest = (net.minecraft.src.TileEntityChest
                                                                         )world.GetBlockTileEntity(k3, l3, i4);
                    int k4 = 0;
                    do
                    {
                        if (k4 >= 8)
                        {
                            goto label0_break;
                        }
                        net.minecraft.src.ItemStack itemstack = PickCheckLootItem(random);
                        if (itemstack != null)
                        {
                            tileentitychest.SetInventorySlotContents(random.Next(tileentitychest.GetSizeInventory
                                                                                     ()), itemstack);
                        }
                        k4++;
                    }while (true);
                    label0_continue :;
                }
                label0_break :;
            }
            world.SetBlockWithNotify(i, j, k, net.minecraft.src.Block.MOB_SPAWNER.ID);
            net.minecraft.src.TileEntityMobSpawner tileentitymobspawner = (net.minecraft.src.TileEntityMobSpawner
                                                                           )world.GetBlockTileEntity(i, j, k);
            tileentitymobspawner.SetMobID(PickMobSpawner(random));
            return(true);
        }
Example #24
0
 public BlockGlowStone(int i, int j, net.minecraft.src.Material material)
     : base(i, j, material)
 {
 }
Example #25
0
 protected internal Block(int i, int j, net.minecraft.src.Material material)
     : this(i, material)
 {
     blockIndexInTexture = j;
 }
Example #26
0
 protected internal BlockContainer(int i, int j, net.minecraft.src.Material material
                                   )
     : base(i, j, material)
 {
     isBlockContainer[i] = true;
 }
Example #27
0
 public BlockGlass(int i, int j, net.minecraft.src.Material material, bool flag)
     : base(i, j, material, flag)
 {
 }