Examples of func_145881_a()


Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

    world.setBlock(xStart, yStart, zStart, Blocks.mob_spawner, 0, 2);
    TileEntityMobSpawner spawner = (TileEntityMobSpawner)world.getTileEntity(xStart, yStart, zStart);

    if (spawner != null) {
      spawner.func_145881_a().readFromNBT(tag);
    } else {
      System.err.println("Failed to fetch mob spawner entity at (" + xStart + ", " + yStart + ", " + zStart + ")");
    }

    return true;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

              }
            }
          }

          TileEntityMobSpawner spawner = (TileEntityMobSpawner) tile;
          MobSpawnerBaseLogic logic = spawner.func_145881_a();
          if(logic != null) {
            String name = logic.getEntityNameToSpawn();
            if(name != null && !isBlackListed(name)) {
              ItemStack drop = ItemBrokenSpawner.createStackForMobType(name);
              dropQueue.add(new DropInfo(evt, drop));
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

  @Override
  public void updateEntity() {
    TileEntity tileBelow = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
    if(mana >= 5 && tileBelow instanceof TileEntityMobSpawner) {
      TileEntityMobSpawner spawner = (TileEntityMobSpawner) tileBelow;
      MobSpawnerBaseLogic logic = spawner.func_145881_a();

      if(!logic.isActivated()) {
        if(!worldObj.isRemote)
          mana -= 6;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

      ItemStack stack = event.entityPlayer.getCurrentEquippedItem();
      if(stack != null && stack.getItem() == Items.spawn_egg) {
        TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z);
        if(tile instanceof TileEntityMobSpawner) {
          TileEntityMobSpawner spawner = (TileEntityMobSpawner) tile;
          spawner.func_145881_a().setEntityName(EntityList.getStringFromID(stack.getItemDamage()));
          event.world.markBlockForUpdate(event.x, event.y, event.z);
          event.setCanceled(true);
        }
      }
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

            if (tileentitymobspawner != null) {
                setDefaultTag(itemstack);
                String mobtype = IDtoNameMap.get(itemstack.getItemDamage());
                if (mobtype != null) {
                    NEICPH.sendMobSpawnerID(placedX, placedY, placedZ, mobtype);
                    tileentitymobspawner.func_145881_a().setEntityName(mobtype);
                }
            }
            return true;
        }
        return false;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

            if (this.worldObj.getBlock(spawnerCoords.posX, spawnerCoords.posY, spawnerCoords.posZ) == Blocks.mob_spawner)
            {
                final TileEntityMobSpawner spawner = (TileEntityMobSpawner) this.worldObj.getTileEntity(spawnerCoords.posX, spawnerCoords.posY, spawnerCoords.posZ);
                if (spawner != null)
                {
                    spawner.func_145881_a().setEntityName(RoomSpawnerMars.getMob(rand));
                }
            }
        }
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

            var1.setBlock(var8, var9, var10, Blocks.mob_spawner, 0, 3);
            final TileEntityMobSpawner var11 = (TileEntityMobSpawner) var1.getTileEntity(var8, var9, var10);

            if (var11 != null)
            {
                var11.func_145881_a().setEntityName(var6);
            }
        }
    }

    protected int[] offsetTowerCoords(int var1, int var2, int var3, int var4, int var5)
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

            if (this.worldObj.getBlock(spawnerCoords.posX, spawnerCoords.posY, spawnerCoords.posZ) == Blocks.mob_spawner)
            {
                final TileEntityMobSpawner spawner = (TileEntityMobSpawner) this.worldObj.getTileEntity(spawnerCoords.posX, spawnerCoords.posY, spawnerCoords.posZ);
                if (spawner != null)
                {
                    spawner.func_145881_a().setEntityName(RoomSpawnerMoon.getMob(rand));
                }
            }
        }
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntityMobSpawner.func_145881_a()

            var1.setBlock(var9, var10, var11, Blocks.mob_spawner, 0, 3);
            var8 = (TileEntityMobSpawner) var1.getTileEntity(var9, var10, var11);

            if (var8 != null)
            {
                var8.func_145881_a().setEntityName(var6);
            }
        }

        return var8;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.