Package com.mojang.minecraft.level.tile

Examples of com.mojang.minecraft.level.tile.Block


                  --var8;
                  ++var20.z;
               }

               int var22 = this.getTile(var6, var7, var8);
               Block var21 = Block.blocks[var22];
               if(var22 > 0 && var21.getLiquidType() == LiquidType.NOT_LIQUID) {
                  MovingObjectPosition var23;
                  if(var21.isCube()) {
                     if((var23 = var21.clip(var6, var7, var8, var1, var2)) != null) {
                        return var23;
                     }
                  } else if((var23 = var21.clip(var6, var7, var8, var1, var2)) != null) {
                     return var23;
                  }
               }
            }
View Full Code Here


      ShapeRenderer var8 = ShapeRenderer.instance;
      var2 = var7.load("/terrain.png");
      GL11.glBindTexture(3553, var2);

      for(var2 = 0; var2 < SessionData.allowedBlocks.size(); ++var2) {
         Block var4 = (Block)SessionData.allowedBlocks.get(var2);
         GL11.glPushMatrix();
         int var5 = this.width / 2 + var2 % 9 * 24 + -108;
         int var6 = this.height / 2 + var2 / 9 * 24 + -60;
         GL11.glTranslatef((float)var5, (float)var6, 0.0F);
         GL11.glScalef(10.0F, 10.0F, 10.0F);
         GL11.glTranslatef(1.0F, 0.5F, 8.0F);
         GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
         GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
         if(var1 == var2) {
            GL11.glScalef(1.6F, 1.6F, 1.6F);
         }

         GL11.glTranslatef(-1.5F, 0.5F, 0.5F);
         GL11.glScalef(-1.0F, -1.0F, -1.0F);
         var8.begin();
         var4.renderFullbright(var8);
         var8.end();
         GL11.glPopMatrix();
      }

   }
View Full Code Here

      Level var1 = this.minecraft.level;
      Player var2 = this.minecraft.player;
      GL11.glFog(2918, this.createBuffer(this.fogRed, this.fogBlue, this.fogGreen, 1.0F));
      GL11.glNormal3f(0.0F, -1.0F, 0.0F);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      Block var5;
      if((var5 = Block.blocks[var1.getTile((int)var2.x, (int)(var2.y + 0.12F), (int)var2.z)]) != null && var5.getLiquidType() != LiquidType.NOT_LIQUID) {
         LiquidType var6 = var5.getLiquidType();
         GL11.glFogi(2917, 2048);
         float var3;
         float var4;
         float var7;
         float var8;
View Full Code Here

  }

  public void breakBlock(int x, int y, int z)
  {
    Level level = minecraft.level;
    Block block = Block.blocks[level.getTile(x, y, z)];

    boolean success = level.netSetTile(x, y, z, 0);

    if(block != null && success)
    {
      if(minecraft.isOnline())
      {
        minecraft.networkManager.sendBlockChange(x, y, z, 0, minecraft.player.inventory.getSelected());
      }

      if(block.stepsound != Tile$SoundType.none)
      {
        level.playSound("step." + block.stepsound.name, (float)x, (float)y, (float)z, (block.stepsound.getVolume() + 1.0F) / 2.0F, block.stepsound.getPitch() * 0.8F);
      }

      block.spawnBreakParticles(level, x, y, z, minecraft.particleManager);
    }

  }
View Full Code Here

         for(int var10 = var1; var10 < var4; ++var10) {
            for(int var11 = var2; var11 < var5; ++var11) {
               for(int var12 = var3; var12 < var6; ++var12) {
                  int var13;
                  if((var13 = this.level.getTile(var10, var11, var12)) > 0) {
                     Block var14;
                     if((var14 = Block.blocks[var13]).getRenderPass() != var7) {
                        var8 = true;
                     } else {
                        var9 |= var14.render(this.level, var10, var11, var12, renderer);
                     }
                  }
               }
            }
         }
View Full Code Here

    } else if(x == hitX && y == hitY && z == hitZ) {
      int type = minecraft.level.getTile(x, y, z);

      if(type != 0)
      {
        Block block = Block.blocks[type];

        hardness = block.getHardness();

        block.spawnBlockParticles(minecraft.level, x, y, z, side, minecraft.particleManager);

        hits++;

        if(hits == hardness + 1)
        {
View Full Code Here

  }

  @Override
  public boolean useItem(Player player, int type)
  {
    Block block = Block.blocks[type];
    if(block == Block.RED_MUSHROOM && minecraft.player.inventory.removeResource(type))
    {
      player.hurt(null, 3);

      return true;
View Full Code Here

TOP

Related Classes of com.mojang.minecraft.level.tile.Block

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.